liyg 2 rokov pred
rodič
commit
ff394999f7

+ 84 - 3
src/views/statisticalReport/components/inwardReport/putInwardReport.vue

@@ -19,14 +19,50 @@
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-button type="primary" class="btn" @click="openDrawer">修改订单回传金蝶</el-button>
       <span style="margin-left: 1rem;">首次/二次合计净重:</span>
       <el-input v-model="totalNumberFrist" :disabled="true" style="width: 140px;"></el-input>
       <span style="margin-left: 1rem;">合计车数:</span>
-      <el-input v-model="totalCapacity" :disabled="true" style="width: 100px;"></el-input>
+      <el-input v-model="totalCapacity" :disabled="true" style="width: 50px;"></el-input>
     </div>
     <div class="table">
-      <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
+      <dilTable ref="excelDom" v-bind.sync="option" @func="func" @selection-change="selectionChange"></dilTable>
     </div>
+    <el-drawer
+      :visible.sync="drawer"
+      direction="rtl"
+      :before-close="handleClose"
+      size="80%"
+    >
+    <el-input
+        placeholder="请输入"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 150px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="searchOrder"
+        style="margin-bottom: 15px">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="reSentEas"
+        style="margin-bottom: 15px">
+        确定上传金蝶
+      </el-button>
+      <div>
+        <dilTable
+        ref="ordertable"
+          v-bind.sync="purchaseOption"
+          @radio-change="orderChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
@@ -40,7 +76,18 @@ export default {
       totalNumberFrist:null,
       totalCapacity:null,
       option: {
-        requestUrl: "",
+        requestUrl: "",// 控制显示多选列
+        selectionType: "select",
+      },
+      drawer:false,
+      input:null,
+      purchaseOrder:null,
+      selection:[],
+      purchaseOption:{
+         // 表格请求数据的地址
+        requestUrl: "/api/v1/ams/getPurchaseOrderList?apiId=81",
+        // 控制选择单列
+        selectionType: "radio"
       },
       startTime: null,
       endTime: null,
@@ -51,6 +98,40 @@ export default {
           this.option.requestUrl = '/api/v1/tms/getPurInwardReport?apiId=441&startTime=null&endTime=null&i=' +new Date()
   },
   methods: {
+    selectionChange(selection){
+      this.selection=selection;
+    },
+    openDrawer(){
+      if(!this.selection || this.selection.length<=0){
+        this.$alert("请先勾选需要修改的运单!");
+        return;
+      }
+      this.drawer = true;
+    },
+    searchOrder(){
+        this.purchaseOption.requestUrl="/api/v1/ams/getPurchaseOrderList?apiId=81&con="+this.input
+    },
+    orderChange(selection) {
+      this.purchaseOrder=selection;
+    },
+    handleClose(){
+      this.drawer=false;
+      this.purchaseOrder=null;
+    },
+    reSentEas(){
+      if(!this.selection || this.selection.length<=0 || !this.purchaseOrder){
+        this.$alert("请先主动勾选采购订单!");
+        return;
+      }
+      let map={
+        list:this.selection,
+        purchaseOrder: this.purchaseOrder
+      }
+      console.log(map);
+      this.axios.post('/api/v1/bp/updateOrderStatus',map).then((res)=>{
+          this.$message.success(res.data.data);
+      });
+    },
     func(res){
         console.log(res)
         var resultNetWeightTotalFirst = 0