From 9c6115340a7cd7e36198a0d0503068a260d30581 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 03 三月 2023 16:32:25 +0800
Subject: [PATCH] 1.节拍工价、工单新增控制必须设置计件单价
---
src/views/scgl/gd.vue | 46 +++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index 34d6360..91601cc 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -147,7 +147,7 @@
:label="row.wo_code"
style="color: transparent;padding-left: 10px;"
/>
-<!-- @change.native="getCurrentRow(row.wo_code)"-->
+ <!-- @change.native="getCurrentRow(row.wo_code)"-->
</template>
</el-table-column>
<el-table-column
@@ -578,6 +578,7 @@
style="width: 200px;"
placeholder="璇烽�夋嫨"
:disabled="dialogForm.routecode===''"
+ @change="wkshopcodeChange"
>
<el-option
v-for="item in wkshopArr"
@@ -594,6 +595,7 @@
type="date"
:clearable="false"
value-format="yyyy-MM-dd"
+ :picker-options="pickerOptions"
style="width: 200px"
placeholder="閫夋嫨鏃ユ湡"
/>
@@ -604,6 +606,7 @@
type="date"
:clearable="false"
value-format="yyyy-MM-dd"
+ :picker-options="pickerOptions"
style="width: 200px"
placeholder="閫夋嫨鏃ユ湡"
/>
@@ -682,9 +685,19 @@
<el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
<!-- <el-button v-if="operation==='add'" type="primary" @click="dialogVisibleConfirmPreview('add')">棰勮</el-button>-->
<el-button
+ v-if="!sumbitBottonIsDisabled"
+ v-waves
type="primary"
:loading="$store.state.app.buttonIsDisabled"
:disabled="$store.state.app.buttonIsDisabled"
+ @click="dialogVisibleConfirm"
+ >纭� 瀹�</el-button>
+
+ <el-button
+ v-if="sumbitBottonIsDisabled"
+ v-waves
+ type="primary"
+ disabled
@click="dialogVisibleConfirm"
>纭� 瀹�</el-button>
</div>
@@ -1559,7 +1572,7 @@
AddUpdateMesOrder,
ClosedMesOrder,
DeleteMesOrder, ErpOrderSearch,
- MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep,
+ MesOrderSearch, PartSelectRoute, RouteSelectWkshop, SearchWorkStep, SelectRouteOrWkshop,
SelectRouteStep
} from '@/api/scgl'
import { InventoryFileAssociationRoute, PartSelect, SaveInventoryFile } from '@/api/zzmx'
@@ -1786,7 +1799,13 @@
// { code: 3, name: '50*40' },
// { code: 4, name: '50*80' },
// { code: 5, name: '40*30' }
- ]
+ ],
+ pickerOptions: {
+ disabledDate(time) {
+ return time.getTime() < Date.now() - 8.64e7
+ }
+ },
+ sumbitBottonIsDisabled: false
}
},
created() {
@@ -1842,6 +1861,20 @@
// 鑾峰彇浜у搧淇℃伅
const { data: res1 } = await PartSelect()
this.partArr = res1
+ },
+ // 鐢熶骇杞﹂棿鍊兼敼鍙樻椂
+ wkshopcodeChange(val) {
+ const data = {
+ partcode: this.dialogForm.partcode,
+ routecode: this.dialogForm.routecode,
+ wkshopcode: val
+ }
+ SelectRouteOrWkshop(data).then((res) => {
+ // console.log(res, 1)
+ }).catch(err => {
+ // console.log(err, 2)
+ this.sumbitBottonIsDisabled = true
+ })
},
// 璁㈠崟鐘舵�佹敼鍙樻椂
erporderstusChange(val) {
@@ -1923,6 +1956,8 @@
}
this.dialogForm.wkshopcode = ''
+
+ this.sumbitBottonIsDisabled = false
},
// 宸ヨ壓璺嚎鍊兼敼鍙�
async routecodeChange(val) {
@@ -1991,7 +2026,7 @@
type: 'warning'
}).then(() => {
const data = {
- souceid: row.sourceid?row.sourceid:'',
+ souceid: row.sourceid ? row.sourceid : '',
wocode: row.wo_code,
m_po: row.m_po,
orderqty: row.plan_qty
@@ -2078,6 +2113,7 @@
this.dialogForm.orderlev = '' // 宸ュ崟绛夌骇
this.$refs.dialogForm.clearValidate()
+ this.sumbitBottonIsDisabled = false
},
// 瀵硅瘽妗嗗彇娑�
dialogVisibleCancel() {
@@ -2209,9 +2245,9 @@
// div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
div.scrollTop = 0 // 婊氬姩鏉′綅浜庢渶椤堕儴
})
+ this.dialogVisibleApprove = true
}
})
- this.dialogVisibleApprove = true
},
dialogVisibleTaskClose() {
this.dialogForm.mesordercode = ''
--
Gitblit v1.9.3