From fe8ebc6854c6773ef45be85a24764f9bb59b8dad Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 14 十一月 2023 17:52:36 +0800
Subject: [PATCH] modified: src/views/plan/customerorder/index.vue
---
src/views/plan/customerorder/index.vue | 136 ++++++++++++++++++++++++++++-----------------
1 files changed, 85 insertions(+), 51 deletions(-)
diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue
index 5541cc9..df9636f 100644
--- a/src/views/plan/customerorder/index.vue
+++ b/src/views/plan/customerorder/index.vue
@@ -250,18 +250,18 @@
</el-dialog>
</basic-container>
- <el-dialog title="閫夋嫨鍚屾鏃ユ湡" :visible.sync="syncDateVisible" width="30%">
+ <el-dialog title="閫夋嫨鍚屾鏃ユ湡" :visible.sync="syncDateVisible" width="20%">
<div style="display: flex;justify-content: center">
- <el-date-picker
- v-model="syncDate"
- type="daterange"
- value-format="yyyy-MM-dd"
- range-separator="鑷�"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
- :picker-options="pickerOptions"
- >
- </el-date-picker>
+ <el-form :model="dataForm" :inline="true" :rules="dataRule" ref="dataForm" class="l-mes">
+ <el-form-item label="鏃ユ湡" prop="selectTime">
+ <el-date-picker
+ v-model="dataForm.selectTime"
+ type="datetime"
+ placeholder="閫夋嫨鏃ユ湡鏃堕棿"
+ value-format="yyyy-MM-dd HH:mm:ss">
+ </el-date-picker>
+ </el-form-item>
+ </el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="syncDateVisible = false">鍙� 娑�</el-button>
@@ -283,6 +283,7 @@
import MpsRequirements from './mps-requirements'
import SalesPartBatchDialog from './sales-part-batch.vue'
import CustomerorderReturnDialog from './customerorder-return.vue'
+import { otcCustomerOrderSync } from '@/api/plan/customerorder'
import {
delCustomerOrder,
fetchListCustomerOrder,
@@ -310,6 +311,14 @@
export default {
data() {
return {
+ dataForm: {
+ selectTime: null,
+ exportTime: null
+ },
+ dataRule: {
+ exportTime:[{required:true,message:'瀵煎嚭鏃ユ湡涓嶈兘涓虹┖',trigger:'change'}],
+ selectTime:[{required:true,message:'鏃ユ湡涓嶈兘涓虹┖',trigger:'change'}]
+ },
pickerOptions: {
onPick: ({ maxDate, minDate }) => {
if (minDate && this.pickerMinDate) {
@@ -333,6 +342,15 @@
showCustomerorderReturn: false,
scheduleVisible: false,
showDocument: false,
+ sourceIdList: [{
+ label: '澶栭儴',
+ value: '0',
+ type: 'success',
+ },{
+ label: '鍐呴儴',
+ value: '1',
+ type: ''
+ }],
stateTagArr: [
{
label: '鏍囪闆朵欢寰呴��',
@@ -652,18 +670,18 @@
],
toolbar: [],
operator: [
- {
- text: '璁㈠崟璇存槑',
- type: 'text',
- size: 'small',
- fun: this.openCustomerOrder
- },
- {
- text: '鏌ョ湅搴撳瓨',
- type: 'text',
- size: 'small',
- fun: this.stockHandle
- },
+ // {
+ // text: '璁㈠崟璇存槑',
+ // type: 'text',
+ // size: 'small',
+ // fun: this.openCustomerOrder
+ // },
+ // {
+ // text: '鏌ョ湅搴撳瓨',
+ // type: 'text',
+ // size: 'small',
+ // fun: this.stockHandle
+ // },
{
text: '浣滃簾',
type: 'text',
@@ -674,7 +692,6 @@
'01partUnCheck',
'02technologyUnCheck',
'03plan'
- // '04planed'
],
key: 'coState'
}
@@ -683,7 +700,7 @@
operatorConfig: {
fixed: 'right',
label: '鎿嶄綔',
- width: 260,
+ width: 100,
minWidth: 100
}
},
@@ -851,6 +868,14 @@
}
},
methods: {
+ getSourceId(row, column, cellValue) {
+ this.sourceIdList.forEach((obj) => {
+ if (obj.value === cellValue) {
+ cellValue = obj.label
+ }
+ })
+ return cellValue
+ },
getOtcPartSyncOptionList() {
return this.otcPartSyncOptionList
},
@@ -861,7 +886,7 @@
prop: 'coState',
searchInfoType: 'select',
// propVal: '01partUnCheck'
- propVal: '02technologyUnCheck'
+ propVal: ''
})
)
this.$refs.customerOrderTable.setQueryParam(queryParam)
@@ -1344,10 +1369,10 @@
'瀛樺湪閿�鍞鍗曞凡鍏宠仈宸ヨ壓鏂囦欢锛屽闇�鏇存敼锛岃鍏堣В闄ゅ叧鑱�'
)
}
- if (item.salesPartNo == null || item.salesPartNo === '') {
- status = true
- this.$message.error('瀛樺湪閿�鍞鍗曟湭缁戝畾閿�鍞欢锛岃鍏堢粦瀹�')
- }
+ // if (item.salesPartNo == null || item.salesPartNo === '') {
+ // status = true
+ // this.$message.error('瀛樺湪閿�鍞鍗曟湭缁戝畾閿�鍞欢锛岃鍏堢粦瀹�')
+ // }
if (item.partNo != firstPartNo) {
status = true
this.$message.error('璁㈠崟闆朵欢鍙蜂笉涓�鑷�')
@@ -1534,28 +1559,37 @@
this.syncDateVisible = false
this.table.toolbar.find((e) => e.text === '鑾峰彇閿�鍞鍗�').loading = true
- syncOrder({
- startTime: this.syncDate[0],
- endTime: this.syncDate[1]
- })
- .then((res) => {
- this.table.toolbar.find(
- (e) => e.text === '鑾峰彇閿�鍞鍗�'
- ).loading = false
- const resData = res.data
- if (resData.code === 0) {
- this.$message.success(resData.data)
- this.getData()
- } else {
- this.$message.error('鍚屾澶辫触')
- }
+ if (this.dataForm.selectTime != null && this.dataForm.selectTime != '') {
+ otcCustomerOrderSync({
+ selectTime: this.dataForm.selectTime,
+ orderNo: ''
})
- .catch((e) => {
- this.table.toolbar.find(
- (e) => e.text === '鑾峰彇閿�鍞鍗�'
- ).loading = false
- this.$forceUpdate()
- })
+ .then((response) => {
+ this.table.toolbar.find(
+ (e) => e.text === '鑾峰彇閿�鍞鍗�'
+ ).loading = false
+ const resData = response.data
+ if (resData.code === 0) {
+ this.$message.success('鑾峰彇閿�鍞鍗曟垚鍔燂紱' + resData.msg)
+ this.dataForm.selectTime = null
+ this.$emit('refreshDataList')
+ this.getData()
+ } else {
+ this.$message.success('鎷夊彇閿�鍞鍗曞け璐�')
+ }
+ })
+ .catch((e) => {
+ this.table.toolbar.find(
+ (e) => e.text === '鑾峰彇閿�鍞鍗�'
+ ).loading = false
+ this.$forceUpdate()
+ })
+ } else {
+ this.table.toolbar.find(
+ (e) => e.text === '鑾峰彇閿�鍞鍗�'
+ ).loading = false
+ this.$message.error('璇峰厛閫夋嫨鏃ユ湡')
+ }
}
}
}
--
Gitblit v1.9.3