From 0f18c4e3a4943dd27e2eeb381e3c00e46218077b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 19 二月 2025 17:54:47 +0800
Subject: [PATCH] 铜材料下单-联调
---
src/views/business/materialOrder/index.vue | 147 +++++++++++++++++++------------------------------
1 files changed, 57 insertions(+), 90 deletions(-)
diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue
index d50868c..e0b3b07 100644
--- a/src/views/business/materialOrder/index.vue
+++ b/src/views/business/materialOrder/index.vue
@@ -110,14 +110,6 @@
</div>
</div>
</div>
-<!-- <div style="width: 100%;height: 100%;">-->
-<!-- <CustomsInspection :active="active"-->
-<!-- :currentId="currentId"-->
-<!-- :customsInspection="customsInspection" :orderType="orderType" />-->
-<!-- </div>-->
-<!-- <div style="width: 100%;height: 100%;">-->
-<!-- <CopperOrder :active="active" :currentId="currentId"></CopperOrder>-->
-<!-- </div>-->
<!-- 纭鍏嶆寮规 -->
<el-dialog :visible.sync="exemptionVisible" title="纭鍏嶆" width="42%">
<div style="display: flex">
@@ -203,7 +195,6 @@
</template>
<script>
-import CustomsInspection from "./customsInspection.vue";
import PrintDialog from "@/views/business/materialOrderComponents/materialOrder/printDialog.vue";
import ShowInfo from "@/views/business/materialOrderComponents/materialOrder/showInfo.vue";
import DataLookVisible from "@/views/business/materialOrderComponents/materialOrder/dataLookVisible.vue";
@@ -211,11 +202,16 @@
import DownFileDialog from "@/views/business/materialOrderComponents/materialOrder/downFileDialog.vue";
import limsTable from "@/components/Table/lims-table.vue";
import {
+ concessionRelease,
getIfsByAll,
getIfsByOver,
- getIfsByQuarter,
getIfsByStateOne,
- getPurchaseOrder
+ rawAllExport,
+ rawOrderRelease,
+ repealEnterRawOrder,
+ repealQuarterRawOrder,
+ revokeInspectionReport,
+ updateEntrustCode
} from "@/api/business/rawMaterialOrder";
import {getWarehouseSubmit} from "@/api/business/materialInspection";
// import Inspection from "../do/b1-inspect-order-plan/Inspection.vue";
@@ -223,7 +219,7 @@
export default {
name: "b1-material-inspection-order",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
- components: {limsTable,DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog, CustomsInspection},
+ components: {limsTable,DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog},
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -241,14 +237,14 @@
if (params == 1) {
return '杩囨湡鐗╂枡'
} else {
- return ''
+ return null
}
},
formatType: (params) => {
if (params == 1) {
return 'info'
} else {
- return ''
+ return null
}
}
},
@@ -261,7 +257,6 @@
dataType: 'action',
fixed: 'right',
label: '鎿嶄綔',
- width: '170px',
operation: [
{
name: '涓嬪崟',
@@ -311,14 +306,14 @@
if (params == 1) {
return '杩囨湡鐗╂枡'
} else {
- return ''
+ return null
}
},
formatType: (params) => {
if (params == 1) {
return 'info'
} else {
- return ''
+ return null
}
}
},
@@ -331,7 +326,6 @@
dataType: 'action',
fixed: 'right',
label: '鎿嶄綔',
- width: '140px',
operation: [
{
name: '鏁版嵁鏌ョ湅',
@@ -387,14 +381,14 @@
if (params == 1) {
return '杩囨湡鐗╂枡'
} else {
- return ''
+ return null
}
},
formatType: (params) => {
if (params == 1) {
return 'info'
} else {
- return ''
+ return null
}
}
},
@@ -405,7 +399,6 @@
dataType: 'action',
fixed: 'right',
label: '鎿嶄綔',
- width: '300px',
operation: [
{
name: '瀛e害妫�楠�',
@@ -501,14 +494,14 @@
if (params == 1) {
return '杩囨湡鐗╂枡'
} else {
- return ''
+ return null
}
},
formatType: (params) => {
if (params == 1) {
return 'info'
} else {
- return ''
+ return null
}
}
},
@@ -519,7 +512,6 @@
dataType: 'action',
fixed: 'right',
label: '鎿嶄綔',
- width: '140px',
operation: [
{
name: '鏁版嵁鏌ョ湅',
@@ -568,14 +560,14 @@
if (params == 1) {
return '杩囨湡鐗╂枡'
} else {
- return ''
+ return null
}
},
formatType: (params) => {
if (params == 1) {
return 'info'
} else {
- return ''
+ return null
}
}
},
@@ -586,7 +578,6 @@
dataType: 'action',
fixed: 'right',
label: '鎿嶄綔',
- width: '250px',
operation: [
{
name: '瀛e害妫�楠�',
@@ -847,7 +838,7 @@
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
- this.$axios.post(this.$api.materialInspection.concessionRelease+'?ifsInventoryId='+row.id).then(res => {
+ concessionRelease({ifsInventoryId: row.id}).then(res => {
if (res.code === 200) {
this.$message({
type: 'success',
@@ -870,7 +861,7 @@
cancelButtonText: "鍙栨秷",
type: "warning"
}).then(() => {
- this.$axios.post(this.$api.rawMaterialOrder.repealQuarterRawOrder + '?quarterOrderId=' + row.quarterOrderId).then(res => {
+ repealQuarterRawOrder({quarterOrderId: row.quarterOrderId}).then(res => {
if (res.code === 200) {
this.$message.success('鎾ら攢鎴愬姛')
this.refreshTable('page')
@@ -940,14 +931,9 @@
// 鎻愪氦鍏嶆淇℃伅
submitExemption () {
this.exemptionLoading = true
- this.$axios.post(this.$api.rawMaterialOrder.rawOrderRelease, {
+ rawOrderRelease({
ifsInventoryId: this.exemptionInfo.id,
partDetail: this.exemptionInfo.partDetail
- }, {
- headers: {
- 'Content-Type': 'application/json'
- },
- noQs: true
}).then(res => {
if (res.code === 200) {
this.exemptionVisible = false
@@ -967,12 +953,10 @@
},
// 鎻愪氦鎾ら攢鎶ユ鐢宠
submitDeclare () {
- this.$axios.post(this.$api.rawMaterialOrder.revokeInspectionReport, {
- id: this.insOrderRow.id
- }).then(res => {
+ revokeInspectionReport({id: this.insOrderRow.id}).then(res => {
if (res.code === 200) {
this.declareDialogVisible = false
- this.refreshTable('page')
+ this.refreshTable()
this.$message.success("鎾ら攢鎶ユ鎴愬姛")
}
}).catch(err => {
@@ -989,7 +973,7 @@
cancelButtonText: "鍙栨秷",
type: "warning"
}).then(() => {
- this.$axios.post(this.$api.rawMaterialOrder.repealEnterRawOrder + '?enterOrderId=' + row.enterOrderId).then(res => {
+ repealEnterRawOrder({enterOrderId: row.enterOrderId}).then(res => {
if (res.code === 200) {
this.$message.success('鎾ら攢鎴愬姛')
this.refreshTable('page')
@@ -1002,7 +986,7 @@
cancelButtonText: "鍙栨秷",
type: "warning"
}).then(() => {
- this.$axios.post(this.$api.rawMaterialOrder.repealQuarterRawOrder + '?quarterOrderId=' + row.quarterOrderId).then(res => {
+ repealQuarterRawOrder({quarterOrderId: row.quarterOrderId}).then(res => {
if (res.code === 200) {
this.$message.success('鎾ら攢鎴愬姛')
this.refreshTable('page')
@@ -1013,21 +997,33 @@
this.insOrderRow = row
},
cancelQuashOrder (type) {
- const url = type === 'enterOrderId' ? this.$api.rawMaterialOrder.repealEnterRawOrder : this.$api.rawMaterialOrder.repealQuarterRawOrder
- const name = type === 'enterOrderId' ? 'enterOrderId' : 'quarterOrderId'
- const paramInfo = type === 'enterOrderId' ? this.insOrderRow.enterOrderId : this.insOrderRow.quarterOrderId
- this.$confirm('鏄惁鎾ら攢褰撳墠鏁版嵁?', "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning"
- }).then(() => {
- this.$axios.post(url + `?${name}=` + paramInfo).then(res => {
- if (res.code === 200) {
- this.$message.success('鎾ら攢鎴愬姛')
- this.refreshTable('page')
- }
- })
- }).catch(() => {})
+ if (type === 'enterOrderId') {
+ this.$confirm('鏄惁鎾ら攢褰撳墠鏁版嵁?', "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ repealEnterRawOrder({enterOrderId: this.insOrderRow.enterOrderId}).then(res => {
+ if (res.code === 200) {
+ this.$message.success('鎾ら攢鎴愬姛')
+ this.refreshTable('page')
+ }
+ })
+ }).catch(() => {})
+ } else {
+ this.$confirm('鏄惁鎾ら攢褰撳墠鏁版嵁?', "璀﹀憡", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ repealQuarterRawOrder({quarterOrderId: this.insOrderRow.quarterOrderId}).then(res => {
+ if (res.code === 200) {
+ this.$message.success('鎾ら攢鎴愬姛')
+ this.refreshTable('page')
+ }
+ })
+ }).catch(() => {})
+ }
},
// 鐐瑰嚮鏍峰搧鍚嶇О鏌ョ湅璇︽儏
selectAllByOne(row) {
@@ -1040,8 +1036,8 @@
},
// 鏁版嵁鏌ョ湅
handleDataLook(row) {
- this.dataDialogVisible = true;
this.dataLookInfo = row
+ this.dataDialogVisible = true;
},
// 鍏抽棴鏁版嵁鏌ョ湅寮规
closeDataLook () {
@@ -1055,28 +1051,6 @@
// 鍏抽棴闄勪欢鏌ョ湅寮规
closeFilesLook () {
this.filesDialogVisible = false
- },
- // 闄勪欢涓嬭浇
- handleDown(row){
- this.$axios.post(this.$api.insOrderPlan.downFile, {
- id: row.id,
- }).then(res => {
- if (res.code === 200) {
- let url = '';
- if(res.data.type==1){
- url = this.javaApi+'/img/'+res.data.fileUrl
- file.downloadIamge(url,row.fileName)
- }else{
- url = this.javaApi+'/word/'+res.data.fileUrl
- const link = document.createElement('a');
- link.href = url;
- link.download = row.fileName;
- link.click();
- }
- }
- }).catch(error => {
-
- })
},
// 鎶ュ憡涓嬭浇
download(row) {
@@ -1104,13 +1078,9 @@
let entity = this.tabIndex === 3 ? {...this.entity, isInspect: 2} : {...this.entity,state: 2, orderState: 4,}
delete entity.orderBy
this.outLoading = true
- this.$axios.post(this.$api.rawMaterialOrder.rawAllExport,{
+ rawAllExport({
entity:entity
- },{
- headers: {
- 'Content-Type': 'application/json'
- }
- ,responseType: "blob"}).then(res => {
+ },{responseType: "blob"}).then(res => {
this.outLoading = false
this.$message.success('瀵煎嚭鎴愬姛')
const blob = new Blob([res],{ type: 'application/octet-stream' });
@@ -1121,16 +1091,13 @@
link.click();
})
},
+ // 鎻愪氦淇敼濮旀墭缂栧彿淇℃伅
submitCode () {
this.submitCodeLoading = true
try {
- this.$axios.post(this.$api.insOrderPlan.updateEntrustCode, {
+ updateEntrustCode({
id: this.entrustCodeInfo.id,
entrustCode: this.entrustCodeInfo.entrustCode,
- }, {
- headers: {
- 'Content-Type': 'application/json'
- }
}).then(res => {
if (res.code === 200) {
this.entrustCodeVisible = false
--
Gitblit v1.9.3