From fde91bdbb4c8c1f45fe8295f2f03de7ddf86484e Mon Sep 17 00:00:00 2001 From: Zhao Qiqi <1287235164@qq.com> Date: Thu, 7 Jul 2022 18:55:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=98=E6=94=BE=E5=9C=B0=E7=82=B9=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cunfangdidianbiangeng.vue | 10 ---- .../cunfangdidianbiangengAdd.vue | 56 +++++++------------ 2 files changed, 19 insertions(+), 47 deletions(-) diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue index 1e36f4bb57..2cf7e9589a 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue @@ -175,13 +175,6 @@ export default { btnKey: 'doSubmit', btnLabel: '提交' }, - { - type: 'primary', - size: 'small', - icon: 'edit', - btnKey: 'toEdit', - btnLabel: '编辑' - }, { type: 'danger', size: 'small', @@ -220,9 +213,6 @@ export default { case 'doSubmit': this.doSubmit() break - case 'toEdit': - this.toEdit() - break case 'doDel': this.doDel() break diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue index adffba9e54..a6ba73a0a5 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue @@ -4,7 +4,7 @@
{{ viewTitle }}
保存 - 提交 + 提交 返回
@@ -86,10 +86,8 @@ - - - - + + @@ -138,18 +136,10 @@ export default { stateId: 0, FormLoading: false, listLoading: false, - disableSubmit: false, location_list: [], targetLocation_list: [], imgList: [], // 附件上传 vinNo_list: [], // 车架号 - InsuranceState_list: [{ - key: '0', - value: '否' - }, { - key: '1', - value: '是' - }], warehouwarehouse_list: [], // 存放地点 temp: { sid: '', @@ -239,16 +229,6 @@ export default { this.temp.targetLocationSid = choosetItem[0].sid console.log('name:', this.temp.targetLocation, 'key:', this.temp.targetLocationKey, 'sid:', this.temp.targetLocationSid) }, - InsuranceStateChange(val) { - const choosetItem = this.InsuranceState_list.filter((item) => item.key == val) - this.temp.InsuranceState = choosetItem[0].value - if (this.temp.InsuranceStateKey == '0') { - this.imgList = [] - this.temp.policyImage = [] - } - this.$forceUpdate() - console.log('name:', this.temp.InsuranceState, 'key:', this.temp.InsuranceStateKey) - }, showAdd() { this.$nextTick(() => { this.$refs['dataForm'].clearValidate() @@ -277,12 +257,9 @@ export default { userSid: window.sessionStorage.getItem('userSid'), sid: sid } - this.disableSubmit = true getCarTransferInfo(data).then((res) => { if (res.success) { this.temp = res.data - this.temp.InsuranceStateKey = res.data.insuranceStateKey - this.temp.InsuranceState = res.data.insuranceState if (this.temp.policyImage.length > 0) { for (var i = 0; i < this.temp.policyImage.length; i++) { const imgName = this.temp.policyImage[i].split('/') @@ -292,19 +269,9 @@ export default { }) } } - if (this.temp.nodeState == '待提交' || this.temp.nodeState == '移库申请'){ - this.disableSubmit = false - } } }) this.getType() - this.InsuranceState_list = [{ - key: '0', - value: '否' - }, { - key: '1', - value: '是' - }] }, getUrl() { if (this.temp.InsuranceStateKey == '1') { @@ -350,13 +317,20 @@ export default { temporaryCard: '', policyImage: [] } - this.disableSubmit = false this.imgList = [] this.vinNo_list = [] this.$emit('doback') }, // 提交添加数据 handleCreate() { + if (this.temp.InsuranceStateKey == '0') { + this.temp.InsuranceState = '否' + this.temp.policyImage = [] + this.imgList = [] + } + if (this.temp.InsuranceStateKey == '1') { + this.temp.InsuranceState = '是' + } this.getUrl() this.$refs['dataForm'].validate((valid) => { if (valid) { @@ -380,6 +354,14 @@ export default { }, handleSubmit() { const _this = this + if (this.temp.InsuranceStateKey == '0') { + this.temp.InsuranceState = '否' + this.temp.policyImage = [] + this.imgList = [] + } + if (this.temp.InsuranceStateKey == '1') { + this.temp.InsuranceState = '是' + } this.getUrl() this.$refs['dataForm'].validate(valid => { if (valid) {