web100 2 éve
szülő
commit
0d408af2ff

+ 42 - 8
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -150,7 +150,7 @@ export default {
                     {
                         label: "业务对象",
                         prop: "customerId",
-
+                        disabled:false,
                         type: 'select',
                         props: {
                             label: 'cname',
@@ -172,7 +172,7 @@ export default {
                         overHidden: true,
                         type: 'select',
                         dicUrl: "/api/blade-sales-part/storageDesc/listAll",
-   
+                        disabled:false,
                         props: {
                             label: 'cname',
                             value: 'id'
@@ -197,6 +197,7 @@ export default {
                         label: '库管',
                         prop: "stockClerkId",
                         type: 'select',
+                        disabled:false,
                         props: {
                             label: 'realName',
                             value: 'id'
@@ -213,7 +214,7 @@ export default {
                         prop: "goodsTotalNum",
                         search: false,
                         overHidden: true,
-                        disabled: true
+                        disabled:false,
                         // width: 120,
                         // rules: [
                         //     {
@@ -226,6 +227,7 @@ export default {
                     {
                         label: "业务日期",
                         prop: "createTime",
+                        disabled:false,
                         type: "datetime",
                         value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
                         format: "yyyy-MM-dd HH:mm",
@@ -241,14 +243,16 @@ export default {
                     {
                         label: "入库单号",
                         prop: "ordNo",
-                        disabled: true
+                        disabled:false,
                     },
                     {
                         label: "来源单号",
                         prop: "srcOrdNo",
-                        disabled: true
+                        disabled:false,
+
                     }, {
                         label: '备注',
+                        disabled:false,
                         prop: "remarks",
                         type: 'textarea',
                         span: 16,
@@ -569,12 +573,42 @@ export default {
         },
         //编辑
         confirmEditing(){
-            this.$set(this.optionForm,'disabled',false)
-            this.$set(this.optionContacts,'disabled',false)
             if(this.form.statusName == '待入库'){
+                this.$set(this.optionForm,'disabled',false)
+                this.$set(this.optionContacts,'disabled',false)
+                this.optionForm.column.forEach(item=>{
+                    if(item.prop == 'remarks' || item.prop == 'customerId' || item.prop == 'storageId' || item.prop == 'createTime' || item.prop == 'stockClerkId'){
+                        item.disabled = false
+                    }else{
+                        item.disabled = true
+
+                    }
+                })
                 this.optionContacts.column.forEach(item=>{
-                    if(item.prop == remarks){
+                    if(item.prop == 'remarks'){
+                        item.disabled = false
+                    }else{
+                        item.disabled = true
+
+                    }
+                })
+            }else{
+                this.$set(this.optionForm,'disabled',false)
+                this.$set(this.optionContacts,'disabled',false)
+                this.optionForm.column.forEach(item=>{
+                    if(item.prop == 'remarks'){
                         item.disabled = false
+                    }else{
+                        item.disabled = true
+
+                    }
+                })
+                this.optionContacts.column.forEach(item=>{
+                    if(item.prop == 'remarks'){
+                        item.disabled = false
+                    }else{
+                        item.disabled = true
+
                     }
                 })
             }

+ 45 - 23
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -10,12 +10,12 @@
         <el-button class="el-button&#45;&#45;small-yh" style="margin-right: 10px" type="primary" size="small"
           v-if="!editButton" @click="confirmEditing">编辑
         </el-button>
+        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
+        </el-button>
         <el-button class="el-button--small-yh" type="warning" size="small" v-if="form.statusName == '已出库'"
           @click="revoke">撤销出库
         </el-button>
-        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer"
-          v-if="form.statusName !== '已出库'">保存数据
-        </el-button>
+
         <el-button class="el-button--small-yh" type="success" size="small" style="margin-left: 6px;"
           v-if="form.statusName == '待出库' || form.statusName == '撤销出库'" @click="complete">出库完成
         </el-button>
@@ -95,10 +95,9 @@ export default {
         span: 8,
         column: [{
           label: '业务对象',
-          disabled: true,
+          disabled: false,
           prop: "customerId",
           type: 'select',
-          disabled:true,
           props: {
             label: 'cname',
             value: 'id'
@@ -112,8 +111,8 @@ export default {
         }, {
           label: '仓库',
           prop: "storageId",
+          disabled: false,
           type: 'select',
-          disabled:true,
           props: {
             label: 'cname',
             value: 'id'
@@ -128,7 +127,7 @@ export default {
           label: '库管',
           prop: "stockClerkId",
           type: 'select',
-          disabled:true,
+          disabled: false,
           props: {
             label: 'realName',
             value: 'id'
@@ -143,7 +142,7 @@ export default {
         {
           label: '业务日期',
           prop: "createTime",
-          disabled:true,
+          disabled: false,
           type: "datetime",
           value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
           format: "yyyy-MM-dd HH:mm",
@@ -158,8 +157,7 @@ export default {
         },
         {
           label: '入库单号',
-          disabled: true,
-          disabled:true,
+          disabled: false,
           prop: "ordNo",
           rules: [
             {
@@ -171,15 +169,15 @@ export default {
         },
         {
           label: '来源单号',
-          disabled: true,
+          disabled: false,
           prop: "srcOrdNo",
-          disabled:true
+          disabled: true
         },
         {
           label: '商品数量',
-          disabled: true,
+          disabled: false,
           prop: "goodsTotalNum",
-          disabled:true,
+          disabled: true,
 
           rules: [
             {
@@ -193,7 +191,7 @@ export default {
           label: '备注',
           prop: "remarks",
           type: 'textarea',
-          disabled:true,
+          disabled: false,
           span: 24,
           minRows: 2
         }]
@@ -276,11 +274,12 @@ export default {
         }, {
           label: '出库数量',
           prop: 'goodsNum',
+          disabled:false,
           disabled: true,
         }, {
           label: '实际数量',
-          disabled: true,
-          prop: 'sendNum'
+          prop: 'sendNum',
+          disabled:false,
         }, {
           label: '备注',
           prop: 'remarks'
@@ -379,8 +378,11 @@ export default {
     this.optionOutboundRecords = await this.getColumnData(this.getColumnName(270.3), this.optionOutboundRecordsBack);
     this.key++
     if (this.onLoad.id && this.detailData.id) {
+      console.log(1);
       this.refresh(this.onLoad.id, true)
+      this.$set(this.optionForm, 'disabled', true)
     } else if (this.onLoad.id) {
+      console.log(2);
       this.refresh(this.onLoad.id, true)
     }
   },
@@ -477,6 +479,11 @@ export default {
         if (res.data.data.statusName == '已出库') {
           // this.$set(this.optionForm, 'disabled', true)
           this.isAddDisabled = true
+          this.optionContacts.column.forEach(item=>{
+            if(item.prop == 'sendNum'){
+              item.disabled = true
+            }
+          })
         }
         this.form = res.data.data
         loading.close();
@@ -519,13 +526,28 @@ export default {
     },
     //编辑
     confirmEditing() {
-      this.optionForm.column.forEach(item => {
-        if (item.prop == 'remarks') {
-          item.disabled = false
-        }
-      })
-      this.isAddDisabled = false
+      if (this.form.statusName == '待出库') {
+        this.$set(this.optionForm, 'disabled', false)
+        this.optionForm.column.forEach(item => {
+          if (item.prop == 'remarks' || item.prop == 'createTime' || item.prop == 'stockClerkId') {
+            item.disabled = false
+          } else {
+            item.disabled = true
+          }
+        })
+        this.isAddDisabled = false
+      }else{
+        this.$set(this.optionForm, 'disabled', false)
+        this.optionForm.column.forEach(item => {
+          if (item.prop == 'remarks') {
+            item.disabled = false
+          } else {
+            item.disabled = true
+          }
+        })
+        this.isAddDisabled = false
 
+      }
     },
     //自定义列保存
     async saveColumnTwo(ref, option, optionBack, code) {

+ 1 - 1
src/views/tirePartsMall/salesManagement/outboundWorkOrder/index.vue

@@ -18,7 +18,7 @@
           :page.sync="page">
         <template slot-scope="{type,size,row,index}" slot="menu">
           <!-- <el-button  :size="size" :type="type" @click="check(row)">查看</el-button> -->
-          <el-button  :size="size" :type="type" @click="$refs.crud.rowDel(row,index)">删除</el-button>
+          <el-button  :size="size" :disabled="dataList.item > 1" :type="type" @click="$refs.crud.rowDel(row,index)">删除</el-button>
         </template>
         <template slot="corpNameSearch">
           <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>

+ 5 - 4
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -28,6 +28,8 @@
                         </el-dropdown-item>
                         <el-dropdown-item @click.native="confirmRefundBtn('确认')" :disabled="isConfirmRefundBtn">确认退款
                         </el-dropdown-item>
+                        <el-dropdown-item @click.native="revocationRequest('撤销')" :disabled="isRevocationRequest">撤销请核
+                        </el-dropdown-item>
                     </el-dropdown-menu>
                 </el-dropdown>
                 <el-dropdown style="line-height: 0">
@@ -39,8 +41,7 @@
                         </el-dropdown-item>
                         <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">请核进度
                         </el-dropdown-item>
-                        <el-dropdown-item @click.native="revocationRequest('撤销')" :disabled="isRevocationRequest">撤销请核
-                        </el-dropdown-item>
+                        
                     </el-dropdown-menu>
                 </el-dropdown>
             </div>
@@ -851,12 +852,12 @@ export default {
             getDetails({ id: id }).then(res => {
                 console.log('res', res);
                 this.form = res.data.data
-                let ordForm = { srcBillNo: this.form.ordNo }
+                let ordForm = { srcBillNo: this.form.srcOrdNo }
                 let _this = this
                 getList(1, 50, ordForm).then((res) => {
                     this.dataList = res.data.data.records ? res.data.data.records : [];
                 })
-                if (this.form.status !== '录入' && this.form.status !== '退款中' && this.form.status !== '已取消' && this.form.status !== '退款请核') {
+                if (this.form.status !== '录入' && this.form.status !== '退款中' && this.form.status !== '已取消' && this.form.status !== '退款请核' && this.form.status !== '已退款') {
                     console.log(1);
                     this.isApplySettlement = false;
                 }