From 47cf5518f0f61dbf8066c2273b9f77c2cd7b1751 Mon Sep 17 00:00:00 2001
From: YLouie <929705085@qq.com>
Date: 星期五, 19 九月 2025 17:56:03 +0800
Subject: [PATCH] 销售订单plm同步
---
src/views/plan/customerorder/index.vue | 465 +++++++++++++++++++++++++++++++--------------------------
src/api/plan/customerorder.js | 8 +
2 files changed, 259 insertions(+), 214 deletions(-)
diff --git a/src/api/plan/customerorder.js b/src/api/plan/customerorder.js
index 2dc7524..a62f9ee 100644
--- a/src/api/plan/customerorder.js
+++ b/src/api/plan/customerorder.js
@@ -422,4 +422,12 @@
})
}
+// 鍚屾PLM鏁版嵁
+export function syncPlm(obj) {
+ return request({
+ url: '/mes/document/syncPlm',
+ method: 'post',
+ data: obj
+ })
+}
diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue
index 87bf7f7..418fe53 100644
--- a/src/views/plan/customerorder/index.vue
+++ b/src/views/plan/customerorder/index.vue
@@ -64,6 +64,13 @@
@click="handleCheck"
>瀹℃牳</el-button
>
+ <el-button
+ style="margin-left: 10px;padding: 9px 14px;"
+ type="primary"
+ v-if="permissions.plan_customerorder_check"
+ @click="syncPLM"
+ >鍚屾PLM</el-button
+ >
<!-- <el-button
style="margin-left: 10px"
type="primary"
@@ -368,7 +375,7 @@
import {
interrelatedOrder,
getInterrelatedOrder,
- checkHanderOrder,
+ checkHanderOrder
} from '@/api/plan/customerOrderInterrelated'
import ConfirmPullCustomerorder from './confirm-pull-customerorder'
import TableForm from './customerorder-form'
@@ -400,7 +407,8 @@
syncOrder,
dropByContractNo,
downloadProduct,
- downloadWordFile
+ downloadWordFile,
+ syncPlm
} from '../../../api/plan/customerorder'
import DocumentTable from '@/views/common/document.vue'
import { remote } from '@/api/admin/dict'
@@ -415,16 +423,16 @@
interrelatedOrderId: null,
interrelatedOrderData: [],
showInterrelatedOrderDialog: false,
- technologyDialog:true,
+ technologyDialog: true,
uniqueStateArr: [],
dataForm: {
selectTime: null,
- exportTime: null,
+ exportTime: null
},
dataRule: {
exportTime: [
- { required: true, message: '瀵煎嚭鏃ユ湡涓嶈兘涓虹┖', trigger: 'change' },
- ],
+ { required: true, message: '瀵煎嚭鏃ユ湡涓嶈兘涓虹┖', trigger: 'change' }
+ ]
},
pickerOptions: {
onPick: ({ maxDate, minDate }) => {
@@ -442,7 +450,7 @@
)
}
return false
- },
+ }
},
exportDialogVisible: false,
syncDateVisible: false,
@@ -455,58 +463,58 @@
label: '鏍囪闆朵欢寰呴��',
command: '01partUnCheck',
disabled: false,
- permitArr: [],
+ permitArr: []
},
{
label: '鏍囪宸ヨ壓鏂囦欢寰呴��',
command: '02technologyUnCheck',
disabled: false,
- permitArr: [],
+ permitArr: []
},
{
label: '鏍囪寰呰鍒�',
command: '03plan',
disabled: false,
- permitArr: [],
+ permitArr: []
},
{
label: '鏍囪宸蹭笅鍙�',
command: '04planed',
disabled: false,
- permitArr: [],
+ permitArr: []
},
{
label: '鏍囪宸蹭綔搴�',
command: '05cancel',
disabled: false,
- permitArr: [],
- },
+ permitArr: []
+ }
],
documentTagArr: [
{
label: '鍏宠仈宸ヨ壓鏂囦欢',
command: 'RELEVANCE',
- disabled: false,
+ disabled: false
},
{
label: '绉婚櫎宸ヨ壓鏂囦欢',
command: 'NORELEVANCE',
- disabled: false,
- },
+ disabled: false
+ }
],
commitStateTagArr: [
{
label: '鏍囪閫氳繃',
command: 'PROCESSED',
disabled: false,
- permitArr: ['01draft'],
+ permitArr: ['01draft']
},
{
label: '鏍囪鍙栨秷',
command: 'CANCELED',
disabled: false,
- permitArr: ['01draft'],
- },
+ permitArr: ['01draft']
+ }
],
ajaxFun: fetchListCustomerOrder,
events: '',
@@ -518,7 +526,7 @@
uploadInfo: {
// 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
isShow: false,
- url: '',
+ url: ''
},
prelang: 'operation',
options: {
@@ -535,7 +543,7 @@
isSearch: true, // 楂樼骇鏌ヨ鎸夐挳
defaultOrderBy: { column: 'placeOrderDate', direction: 'desc' },
cancelRunCreated: true,
- reserveSelection: true,//鏄惁淇濈暀涔嬪墠閫夋嫨鐨勬暟鎹�
+ reserveSelection: true // 鏄惁淇濈暀涔嬪墠閫夋嫨鐨勬暟鎹�
},
table: {
total: 0,
@@ -553,7 +561,7 @@
isTrue: true,
isSearch: true,
searchInfoType: 'text',
- render: { fun: this.addOrUpdateHandle },
+ render: { fun: this.addOrUpdateHandle }
},
{
minWidth: '120',
@@ -561,7 +569,7 @@
label: '宸ョ▼鍚嶇О',
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '120',
@@ -570,7 +578,7 @@
sort: true,
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '100',
@@ -583,7 +591,7 @@
formatter: this.getSourceId,
optList: () => {
return this.sourceIdList
- },
+ }
},
{
minWidth: '200',
@@ -594,7 +602,7 @@
isTrue: true,
isSearch: true,
searchInfoType: 'datetimerange',
- formatter: this.formatDutyDate,
+ formatter: this.formatDutyDate
},
{
minWidth: '120',
@@ -604,7 +612,7 @@
isTrue: true,
isSearch: true,
searchInfoType: 'datetimerange',
- formatter: this.formatDutyDate,
+ formatter: this.formatDutyDate
},
{
minWidth: '120',
@@ -613,7 +621,7 @@
sort: true,
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '120',
@@ -626,7 +634,7 @@
formatter: this.getCustomerCoState,
optList: () => {
return this.coStateList
- },
+ }
},
{
minWidth: '120',
@@ -639,7 +647,7 @@
formatter: this.getIsAudit,
optList: () => {
return this.isAuditList
- },
+ }
},
{
minWidth: '120',
@@ -652,7 +660,7 @@
formatter: this.checkIsPass,
optList: () => {
return this.isPassList
- },
+ }
},
{
minWidth: '120',
@@ -665,7 +673,7 @@
formatter: this.checkIsOa,
optList: () => {
return this.isOaList
- },
+ }
},
{
minWidth: '120',
@@ -675,7 +683,7 @@
sort: true,
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '120',
@@ -685,7 +693,7 @@
sort: true,
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '120',
@@ -694,7 +702,7 @@
label: '闅跺睘鍝佺墝',
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '120',
@@ -703,7 +711,7 @@
label: '鍗曚綅',
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '120',
@@ -713,7 +721,7 @@
sort: true,
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '120',
@@ -722,7 +730,7 @@
sort: true,
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '140',
@@ -735,7 +743,7 @@
formatter: this.getManufactureAttr,
optList: () => {
return this.manufactureAttrList
- },
+ }
},
{
minWidth: '140',
@@ -744,7 +752,7 @@
sort: true,
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '140',
@@ -753,7 +761,7 @@
sort: true,
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '140',
@@ -762,7 +770,7 @@
sort: true,
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '140',
@@ -771,7 +779,7 @@
sort: true,
isTrue: true,
isSearch: true,
- searchInfoType: 'text',
+ searchInfoType: 'text'
},
{
minWidth: '140',
@@ -782,8 +790,8 @@
isTrue: true,
isSearch: true,
searchInfoType: 'datetimerange',
- formatter: this.formatDutyDate,
- },
+ formatter: this.formatDutyDate
+ }
],
toolbar: [],
operator: [
@@ -805,24 +813,24 @@
// size: 'small',
// fun: this.packageExportHandle
// },
- // {
- // text: '瀹℃牳',
- // type: 'text',
- // size: 'small',
- // fun: this.checkHandOrder,
- // showFun: (row) => {
- // return row.sourceId === '1'
- // },
- // show: {
- // val: [false],
- // key: 'isPass',
- // },
- // },
+ // {
+ // text: '瀹℃牳',
+ // type: 'text',
+ // size: 'small',
+ // fun: this.checkHandOrder,
+ // showFun: (row) => {
+ // return row.sourceId === '1'
+ // },
+ // show: {
+ // val: [false],
+ // key: 'isPass',
+ // },
+ // },
{
text: '宸插叧鑱旇鍗�',
type: 'text',
size: 'small',
- fun: this.showInterrelatedOrder,
+ fun: this.showInterrelatedOrder
},
{
text: '鍒犻櫎',
@@ -833,88 +841,88 @@
val: [
'01partUnCheck',
'02technologyUnCheck',
- '03plan',
+ '03plan'
// '04planed'
],
- key: 'coState',
- },
- },
+ key: 'coState'
+ }
+ }
],
operatorConfig: {
fixed: 'right',
label: '鎿嶄綔',
width: 200,
- minWidth: 200,
- },
+ minWidth: 200
+ }
},
addOrUpdateVisible: false,
coStateList: [
{
value: '01partUnCheck',
- label: '闆朵欢寰呴��',
+ label: '闆朵欢寰呴��'
},
{
value: '02technologyUnCheck',
- label: '宸ヨ壓鏂囦欢寰呴��',
+ label: '宸ヨ壓鏂囦欢寰呴��'
},
{
value: '03plan',
- label: '寰呰鍒�',
+ label: '寰呰鍒�'
},
{
value: '04planed',
- label: '宸蹭笅鍙�',
+ label: '宸蹭笅鍙�'
},
{
value: '05cancel',
- label: '宸蹭綔搴�',
+ label: '宸蹭綔搴�'
},
{
value: '06unedit',
- label: '璁㈠崟缂栬緫',
- },
+ label: '璁㈠崟缂栬緫'
+ }
],
manufactureAttrList: [
{
label: '鏅��',
- value: 'N',
+ value: 'N'
},
{
label: '鏍峰搧',
- value: 'S',
+ value: 'S'
},
{
label: '鐮斿彂',
- value: 'D',
- },
+ value: 'D'
+ }
],
isAuditList: [
{
value: '01draft',
- label: '鑽夌',
+ label: '鑽夌'
},
{
value: '02pending',
- label: '瀹℃牳涓�',
+ label: '瀹℃牳涓�'
},
{
value: '03accepted',
- label: '閫氳繃',
+ label: '閫氳繃'
},
{
value: '04reject',
- label: '閫�鍥�',
- },
+ label: '閫�鍥�'
+ }
],
sourceIdList: [
{
label: '鍚屾',
- value: '0',
+ value: '0'
},
{
label: '鎵嬪姩',
- value: '1',
- },
+ value: '1'
+ }
],
stockVisible: false,
partName: null,
@@ -927,20 +935,20 @@
id: '',
customerOrderNo: '',
splitQuantity: '',
- title: '',
+ title: ''
},
rules: {
splitQuantity: [
{ required: true, message: '鏁伴噺涓嶈兘涓虹┖', trigger: 'blur' },
- { validator: validateSixDecimal, trigger: 'blur' },
+ { validator: validateSixDecimal, trigger: 'blur' }
],
- title: [{ required: true, message: '鎶ご涓嶈兘涓虹┖', trigger: 'blur' }],
+ title: [{ required: true, message: '鎶ご涓嶈兘涓虹┖', trigger: 'blur' }]
},
titleList: [],
- buttonDisable: false,
+ buttonDisable: false
},
headers: {
- Authorization: 'Bearer ' + getStore({ name: 'access_token' }),
+ Authorization: 'Bearer ' + getStore({ name: 'access_token' })
},
fileList: [],
outBatchUploadUrl: '/mes/operationTaskProduce/upload',
@@ -949,23 +957,23 @@
otcPartSyncOptionList: [
{
value: true,
- label: '宸插悓姝�',
+ label: '宸插悓姝�'
},
{
value: false,
- label: '鏈悓姝�',
- },
+ label: '鏈悓姝�'
+ }
],
showSalesPartBatch: false,
addOrUpdateEescVisible: false,
isPassList: [
{ label: '鏈�氳繃', value: false },
- { label: '閫氳繃', value: true },
+ { label: '閫氳繃', value: true }
],
isOaList: [
{ label: '鏈彁浜�', value: false },
- { label: '宸叉彁浜�', value: true },
- ],
+ { label: '宸叉彁浜�', value: true }
+ ]
}
},
components: {
@@ -980,10 +988,10 @@
SalesPartBatchDialog,
TableFormDEesc,
CustomerorderReturnDialog,
- TechnologyForm,
+ TechnologyForm
},
computed: {
- ...mapGetters(['permissions']),
+ ...mapGetters(['permissions'])
},
watch: {
exportDialogVisible(newVal) {
@@ -997,7 +1005,7 @@
this.getData()
}
},
- immediate: true,
+ immediate: true
},
interrelatedOrderId(newVal) {
if (newVal) {
@@ -1011,7 +1019,7 @@
console.error(error)
})
}
- },
+ }
},
mounted() {
this.initQueryParams()
@@ -1020,13 +1028,13 @@
// this.getManufactureAttrs()
this.getTitles()
if (this.permissions.plan_customerorder_add) {
- this.table.toolbar.push({
- text: '鏂板閿�鍞鍗�',
- type: 'primary',
- fun: this.addSampleCustomerOrder,
- disabled: false,
- permitArr: [],
- })
+ this.table.toolbar.push({
+ text: '鏂板閿�鍞鍗�',
+ type: 'primary',
+ fun: this.addSampleCustomerOrder,
+ disabled: false,
+ permitArr: []
+ })
}
if (this.permissions.customerorder_from_otc) {
this.table.toolbar.push({
@@ -1034,7 +1042,7 @@
type: 'primary',
fun: this.syncERP,
disabled: false,
- permitArr: [],
+ permitArr: []
})
}
if (this.permissions.customerorder_submit_oa) {
@@ -1044,7 +1052,7 @@
fun: this.auditCustomerOrder,
disabled: false,
permitArr: [],
- loading: false,
+ loading: false
})
}
if (this.permissions.customerorder_set_salesparts) {
@@ -1053,42 +1061,42 @@
type: 'primary',
fun: this.setSalesPart,
disabled: false,
- permitArr: [],
+ permitArr: []
})
}
- if(this.permissions.plan_download_process_file){
- this.table.toolbar.push({
- text: '涓嬭浇宸ヨ壓鏂囦欢',
- disabled: false,
- type: 'primary',
- fun: this.downloadWord,
- permitArr: ['03plan','04planed'],
- })
+ if (this.permissions.plan_download_process_file) {
+ this.table.toolbar.push({
+ text: '涓嬭浇宸ヨ壓鏂囦欢',
+ disabled: false,
+ type: 'primary',
+ fun: this.downloadWord,
+ permitArr: ['03plan', '04planed']
+ })
}
- if(this.permissions.plan_download_product_file){
- this.table.toolbar.push({
- text: '涓嬭浇鎺掍骇鍗�',
- disabled: false,
- type: 'primary',
- permitArr: [],
- fun: this.downloadProductionScheduling,
- })
+ if (this.permissions.plan_download_product_file) {
+ this.table.toolbar.push({
+ text: '涓嬭浇鎺掍骇鍗�',
+ disabled: false,
+ type: 'primary',
+ permitArr: [],
+ fun: this.downloadProductionScheduling
+ })
}
- if(this.permissions.plan_relevance_order){
- this.table.toolbar.push({
- text: '鍏宠仈璁㈠崟',
- disabled: false,
- type: 'primary',
- fun: this.interrelatedOrderFun,
- permitArr: [],
- })
+ if (this.permissions.plan_relevance_order) {
+ this.table.toolbar.push({
+ text: '鍏宠仈璁㈠崟',
+ disabled: false,
+ type: 'primary',
+ fun: this.interrelatedOrderFun,
+ permitArr: []
+ })
}
if (this.permissions.customerorder_create_masterplan) {
this.table.toolbar.push({
text: '涓荤敓浜ц鍒�',
disabled: false,
fun: this.masterPlanHandle,
- permitArr: [],
+ permitArr: []
})
}
},
@@ -1097,7 +1105,7 @@
this.$confirm('纭瀹℃牳閫氳繃璇ラ攢鍞鍗曞悧?', '鎻愮ず', {
confirmButtonText: '閫氳繃',
cancelButtonText: '鍙栨秷',
- type: 'warning',
+ type: 'warning'
})
.then(() => {
checkHanderOrder(val)
@@ -1133,7 +1141,7 @@
}
interrelatedOrder({
customerOrderAutoId: autoId,
- customerOrderHandId: handId,
+ customerOrderHandId: handId
})
.then((res) => {
if (res.status === 200) {
@@ -1144,44 +1152,47 @@
console.error(error)
})
},
- //灞曠ず宸插叧鑱旇鍗�
+ // 灞曠ず宸插叧鑱旇鍗�
showInterrelatedOrder(currentOrder) {
this.interrelatedOrderId = currentOrder.id
this.showInterrelatedOrderDialog = true
},
- //涓嬭浇鎺掍骇閫氱煡鍗�
- downloadProductionScheduling(){
- let ids = this.multipleSelection.map(obj => obj.id)
- if(ids.length<1){
- this.$message.error("璇烽�夋嫨涓�鏉℃暟鎹�")
- return
- }
- downloadProduct(ids).then(res=>{
- if(res.status===200){
- transform(res)
- }
- }).catch(error=>{
- console.error(error)
+ // 涓嬭浇鎺掍骇閫氱煡鍗�
+ downloadProductionScheduling() {
+ const ids = this.multipleSelection.map((obj) => obj.id)
+ if (ids.length < 1) {
+ this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹�')
+ return
+ }
+ downloadProduct(ids)
+ .then((res) => {
+ if (res.status === 200) {
+ transform(res)
+ }
+ })
+ .catch((error) => {
+ console.error(error)
})
},
- //涓嬭浇宸ヨ壓鏂囦欢
- downloadWord(){
- let ids = this.multipleSelection.map(ele=>ele.id)
- if(ids.length<1){
- this.$message.error("璇烽�夋嫨涓�鏉℃暟鎹�")
- return
- }
- downloadWordFile(ids).then(response=>{
+ // 涓嬭浇宸ヨ壓鏂囦欢
+ downloadWord() {
+ const ids = this.multipleSelection.map((ele) => ele.id)
+ if (ids.length < 1) {
+ this.$message.error('璇烽�夋嫨涓�鏉℃暟鎹�')
+ return
+ }
+ downloadWordFile(ids)
+ .then((response) => {
// 澶勭悊杩斿洖鐨勬枃浠舵祦
const blob = response.data
const link = document.createElement('a')
link.href = URL.createObjectURL(blob)
const disposition = response.headers['content-disposition']
- let temp = disposition.substring(disposition.lastIndexOf('=') + 1)
+ const temp = disposition.substring(disposition.lastIndexOf('=') + 1)
link.download = decodeURI(temp)
document.body.appendChild(link)
link.click()
- window.setTimeout(function () {
+ window.setTimeout(function() {
URL.revokeObjectURL(blob)
document.body.removeChild(link)
}, 0)
@@ -1198,7 +1209,7 @@
queryParam.push(
Object.assign({
prop: 'coState',
- searchInfoType: 'select',
+ searchInfoType: 'select'
// propVal: '01partUnCheck'
// propVal: '02technologyUnCheck'
})
@@ -1361,15 +1372,15 @@
}
})
if (flag) {
- checkOA(
- this.multipleSelection.map((e) => e.id)
- ).then((res) => {
- if (res.data.data.success) {
- this.auditCustomerOrderSure(ids)
- }
- }).catch(error=>{
- this.$message.error(error.message)
- })
+ checkOA(this.multipleSelection.map((e) => e.id))
+ .then((res) => {
+ if (res.data.data.success) {
+ this.auditCustomerOrderSure(ids)
+ }
+ })
+ .catch((error) => {
+ this.$message.error(error.message)
+ })
} else {
this.$message.error('瀛樺湪閿�鍞鍗曟湭缁戝畾闆朵欢鍙凤紒')
}
@@ -1406,7 +1417,7 @@
id: row.id,
customerOrderNo: row.customerOrderNo,
splitQuantity: '',
- title: '',
+ title: ''
}
this.$nextTick(() => {
this.$refs.packageExportForm.resetFields()
@@ -1422,7 +1433,7 @@
exportCustomerOrderSplit({
id: this.packageExport.form.id,
splitQuantity: this.packageExport.form.splitQuantity,
- title: this.packageExport.form.title,
+ title: this.packageExport.form.title
})
.then((response) => {
transform(response)
@@ -1440,7 +1451,7 @@
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
closeOnClickModal: false,
- type: 'warning',
+ type: 'warning'
}).then(() => {
dropByContractNo({ id: row.id }).then((res) => {
if (res.data.code === 0) {
@@ -1477,7 +1488,7 @@
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
closeOnClickModal: false,
- type: 'warning',
+ type: 'warning'
})
.then(() => {
return delCustomerOrder(row.id)
@@ -1491,7 +1502,7 @@
handleSelectionChange(val) {
// 鏍规嵁鐘舵�侊紝绂佺敤琛ㄥご鎸夐挳
// 绛涢�夊嚭閫変腑璁板綍鐨勭姸鎬�
- var stateArr = val.map(function (value, index) {
+ var stateArr = val.map(function(value, index) {
return value.coState
})
// 閫変腑鐘舵�佹暟缁勫厓绱犲幓閲�
@@ -1809,7 +1820,7 @@
if (!isLt10M) {
this.$message({
message: '鏂囦欢澶у皬',
- type: 'warning',
+ type: 'warning'
})
}
return isLt10M
@@ -1821,7 +1832,7 @@
} else {
this.$message({
message: '涓婁紶鎴愬姛',
- type: 'success',
+ type: 'success'
})
this.getData()
}
@@ -1839,7 +1850,7 @@
downDataTemplate() {
uploadBatchTemplate().then((response) => {
const blob = new Blob([response.data], {
- type: 'application/force-download',
+ type: 'application/force-download'
})
const filename = decodeURI('妯℃澘鏂囦欢.xlsx')
// 鍒涘缓涓�涓秴閾炬帴锛屽皢鏂囦欢娴佽祴杩涘幓锛岀劧鍚庡疄鐜拌繖涓秴閾炬帴鐨勫崟鍑讳簨浠�
@@ -1879,10 +1890,10 @@
// } else {
// this.$message.error('璇烽�夋嫨鑷冲皯涓�鏉¢攢鍞鍗�')
// }
- this.$refs['exportForm'].validate((valid) => {
+ this.$refs.exportForm.validate((valid) => {
if (valid) {
const exportTime = this.dataForm.exportTime
- let queryParam = this.$refs.customerOrderTable.getQueryParam()
+ const queryParam = this.$refs.customerOrderTable.getQueryParam()
queryParam.selectTime = exportTime
exportCustomerOrder(queryParam)
.then((response) => {
@@ -1924,7 +1935,7 @@
if (this.dataForm.selectTime != null && this.dataForm.selectTime != '') {
otcCustomerOrderSync({
selectTime: this.dataForm.selectTime,
- pathCode: '1',
+ pathCode: '1'
})
.then((response) => {
this.table.toolbar.find(
@@ -1953,40 +1964,66 @@
this.$message.error('璇峰厛閫夋嫨鏃ユ湡')
}
},
- handleCheck(){
- if (this.multipleSelection.length > 0) {
- for(let i=0 ;i<this.multipleSelection.length;i++){
- if(this.multipleSelection[i].sourceId==0){
- this.$message.error('璇烽�夋嫨鎵嬪姩杈撳叆鐨勯攢鍞鍗�')
- return;
- }
- if(this.multipleSelection[i].isPass){
- this.$message.error('璇烽�夋嫨鏈鏍搁�氳繃鐨勯攢鍞鍗�')
- return;
- }
- }
- this.$confirm('纭瀹℃牳閫氳繃閫変腑鐨勯攢鍞鍗曞悧?', '鎻愮ず', {
- confirmButtonText: '閫氳繃',
- cancelButtonText: '鍙栨秷',
- type: 'warning',
- })
- .then(() => {
- checkHanderOrder(this.multipleSelection)
- .then((res) => {
- if (res.status === 200) {
- this.$message.success('瀹℃牳閫氳繃')
- this.getData()
- }
- })
- .catch((error) => {
- console.error(error)
- })
- })
- .catch(() => {})
- } else {
- this.$message.error('璇烽�夋嫨鑷冲皯涓�鏉¢攢鍞鍗�')
+ handleCheck() {
+ if (this.multipleSelection.length > 0) {
+ for (let i = 0; i < this.multipleSelection.length; i++) {
+ if (this.multipleSelection[i].sourceId == 0) {
+ this.$message.error('璇烽�夋嫨鎵嬪姩杈撳叆鐨勯攢鍞鍗�')
+ return
+ }
+ if (this.multipleSelection[i].isPass) {
+ this.$message.error('璇烽�夋嫨鏈鏍搁�氳繃鐨勯攢鍞鍗�')
+ return
+ }
}
+ this.$confirm('纭瀹℃牳閫氳繃閫変腑鐨勯攢鍞鍗曞悧?', '鎻愮ず', {
+ confirmButtonText: '閫氳繃',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ })
+ .then(() => {
+ checkHanderOrder(this.multipleSelection)
+ .then((res) => {
+ if (res.status === 200) {
+ this.$message.success('瀹℃牳閫氳繃')
+ this.getData()
+ }
+ })
+ .catch((error) => {
+ console.error(error)
+ })
+ })
+ .catch(() => {})
+ } else {
+ this.$message.error('璇烽�夋嫨鑷冲皯涓�鏉¢攢鍞鍗�')
+ }
+ },
+
+ syncPLM() {
+ console.log(this.multipleSelection)
+ if (this.multipleSelection.length > 0) {
+ this.$confirm('纭鍚屾閫変腑鐨勯攢鍞鍗曞悧?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ })
+ .then(() => {
+ syncPlm(this.multipleSelection.map((item) => item.partNo))
+ .then((res) => {
+ if (res.status === 200) {
+ this.$message.success('鍚屾鎴愬姛')
+ this.getData()
+ }
+ })
+ .catch((error) => {
+ console.error(error)
+ })
+ })
+ .catch(() => {})
+ } else {
+ this.$message.error('璇烽�夋嫨鑷冲皯涓�鏉¢攢鍞鍗�')
+ }
}
- },
+ }
}
</script>
--
Gitblit v1.9.3