Browse Source

bug修复

qymljy 1 year ago
parent
commit
36bc0f1cbe

+ 1 - 1
src/HDrpManagement/orderManage/details/index.vue

@@ -94,7 +94,7 @@
       <div slot="slot0">
         <product-list @select="select" @onSuccess="queryMainData()" :data="mainData"  ref="prod">
           <div slot="operation">
-            <importFile v-if="mainData.status !== '提交' && mainData.status !== '审核' && mainData.status !== '关闭'" ref="importFile" class="inline-16" :bindData="{ownertable:'sa_order',ownerid:$route.query.id,usetype:'default'}" :ordertype="mainData.type" :errorUrl="errorUrl" @clearUrl="errorUrl = null" @onSuccess="bindImportOrder"></importFile>
+            <importFile v-if="mainData.status == '新建'" ref="importFile" class="inline-16" :bindData="{ownertable:'sa_order',ownerid:$route.query.id,usetype:'default'}" :ordertype="mainData.type" :errorUrl="errorUrl" @clearUrl="errorUrl = null" @onSuccess="bindImportOrder"></importFile>
             <changeOrderMx v-if="mainData.status === '审核'" :tableData="selection" class="inline-16" :data="mainData" @onSuccess="$refs['prod'].listData();queryMainData"></changeOrderMx>
             <el-button :disabled="mainData.status !== '审核' || selection.length === 0"  size="small" type="primary" style="margin-bottom:12px" @click="adddispatch">{{$t(`一键发货`)}}</el-button>
           </div>

+ 6 - 10
src/HDrpManagement/orderManage/details/tabs/changeOrderMx.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button type="primary" size="small" :disabled="tableData.length === 0" @click="onShow">{{$t(`明细变更`)}}</el-button>
+    <el-button type="primary" size="small" :disabled="tableData.length === 0" @click="onShow" @close="onClose">{{$t(`明细变更`)}}</el-button>
     <el-dialog :title="$t(`明细变更`)" append-to-body :visible.sync="dialogVisible" width="900px">
       <el-table
         class="normal-margin"
@@ -66,8 +66,8 @@
           </template>
         </el-table-column>
         <el-table-column
-            v-if="siteid === 'HY'"
             prop="newdeliverydate"
+            v-if="siteid === 'HY'"
             :label="$t(`变更交期`)"
             width="175"
             fixed="right">
@@ -86,12 +86,12 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="newvalue"
+           prop="newvalue"
           :label="$t(`变更数量`)"
           width="180"
           fixed="right">
           <template slot-scope="scope">
-            <el-input size="mini" @input="onInput(scope.row,scope.$index)"  v-model="scope.row.newvalue" ></el-input>
+            <el-input size="mini" @input="onInput(scope.row,scope.$index)" v-model="scope.row.newvalue" ></el-input>
           </template>
         </el-table-column>
       </el-table>
@@ -133,7 +133,7 @@ export default {
         qty:''
       },
       deliverydate:'',
-      siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid
+      siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid,
     }
   },
   methods:{
@@ -141,12 +141,8 @@ export default {
       this.deliverydate = val
     },
     onShow () {
-      this.listData = this.tableData.map(e=>{
-        e.newvalue = this.siteid === 'HY'?'':0
-        return e
-      })
+      this.listData = this.tableData
       this.dialogVisible = true
-
     },
     onClose(){
       this.form.remarks = ''

+ 6 - 3
src/HDrpManagement/orderManage/details/tabs/productlist.vue

@@ -312,7 +312,6 @@ export default {
       freefreightamount:null,
       drawer:false,
       dataRefresh:true,
-      siteid:'',
       setcol:24,
       tableData:[],
       tablecols:[],
@@ -360,14 +359,18 @@ export default {
           }
         },
       },
-      tablecolsAdd:[]
+      tablecolsAdd:[],
+      siteid:JSON.parse(sessionStorage.getItem('active_account')).siteid,
     }
   },
   methods:{
     async listData () {
       this.param.content.sa_orderid = this.$route.query.id
       const res = await this.$api.requested(this.param)
-      this.tableData = res.data
+      this.tableData = res.data.map(e=>{
+        e.newvalue = this.siteid === 'HY'?'':0
+        return e
+      })
       this.total = res.total
       this.totalPage = Math.ceil(this.total /200)
       this.currentPage = res.pageNumber