wengyuwen 4 anni fa
parent
commit
314aaa81c9

+ 50 - 46
src/views/warehouseBusiness/inStock/index.vue

@@ -278,7 +278,8 @@
       <el-table-column label="司机名称" align="center" prop="fDriverName" />
       <el-table-column label="司机电话" align="center" prop="fDriverTel" width="120"/>
       <el-table-column label="司机身份证" align="center" prop="fDriverIdCar" width="180"/>
-      <el-table-column label="业务类别" align="center" prop="fBusinessType" :formatter="fBusinessTypeFormat"/>
+      <el-table-column label="业务类别" align="center" prop="fBusinessType"
+       :formatter="fBusinessTypeFormat"/>
       <el-table-column
         width="100"
         label="入库状态"
@@ -362,6 +363,8 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
+
+
     <!-- 新增或修改仓库主(出入库)对话框 -->
     <el-dialog
       :visible.sync="open"
@@ -460,7 +463,7 @@
           </el-col>
 
           <el-col :span="8">
-            <el-form-item label="仓1库" prop="fWarehouseid">
+            <el-form-item label="仓库" prop="fWarehouseid">
               <el-select
                 v-model="form.fWarehouseid"
                 filterable
@@ -1133,7 +1136,7 @@
               <el-table-column
                 prop="fWarehouseInformation"
                 header-align="center"
-                width="140px"
+                width="240px"
                 align="center"
                 label="*库区"
               >
@@ -1147,29 +1150,7 @@
                   </el-input>
                 </template>
               </el-table-column>
-<!--                <treeselect v-model="fWarehouselocid" :options="warehousesOptions" :show-count="true" placeholder="请选择归属库区" />-->
 
-<!--                  <el-select-->
-<!--                    v-model="scope.row.fWarehouselocid"-->
-<!--                    filterable-->
-<!--                    remote-->
-<!--                    :disabled="-->
-<!--                    browseStatus ||-->
-<!--                    scope.row.fBillstatus === 20 ||-->
-<!--                    scope.row.fBillstatus === 30 ||-->
-<!--                    scope.row.fBillstatus === 40-->
-<!--                  "-->
-<!--                    placeholder="请选择库位"-->
-<!--                  >-->
-<!--                    <el-option-->
-<!--                      v-for="(dict, index) in kqhouseOptions"-->
-<!--                      :key="index.fId"-->
-<!--                      :label="dict.fName"-->
-<!--                      :value="dict.fId"-->
-<!--                    ></el-option>-->
-<!--                  </el-select>-->
-<!--                </template>-->
-<!--              </el-table-column>-->
               <el-table-column
                 prop="fcntrtype"
                 header-align="center"
@@ -1704,6 +1685,27 @@
               </template>
             </el-table-column>
             <el-table-column
+              prop="fBusinessType"
+              header-align="center"
+              align="center"
+              width="180px"
+              label="作业类型"
+            >
+              <el-select
+                style="width: 80%"
+                v-model="warehouseDrList.fBusinessType"
+                filterable
+                disabled
+              >
+                <el-option
+                  v-for="(dict,index) in businessTypeOption"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-table-column>
+            <el-table-column
               prop="fFeeUnitid"
               header-align="center"
               align="center"
@@ -1788,7 +1790,9 @@
               label="结算方式"
             >
               <template slot-scope="scope">
-                <el-select v-model="scope.row.fStltypeid" style="width: 250px" placeholder="请选择结算表票结、月结">
+                <el-select
+                  v-model="scope.row.fStltypeid"
+                  placeholder="请选择结算表票结、月结">
                   <el-option
                     v-for="dict in fStltypeidOptions"
                     :key="dict.dictValue"
@@ -2931,6 +2935,8 @@ export default {
   },
   data() {
     return {
+      information:'',
+      informationId:'',
       inDex:'',
       Warehouse:'',
       treeselectList:{
@@ -3275,31 +3281,24 @@ export default {
     },
     /** 查询部门下拉树结构 */
     getTreeselect(row) {
-      console.log(row)
       this.treeselectList.fWarehouselocid = null
       this.inDex = row.$index
       this.choiceWarehouse = true
       treeselect(this.form.fWarehouseid).then(response => {
-        console.log(response)
         this.fWarehouseidOptions = response.data;
-        console.log(this.fWarehouseidOptions)
-        // console.log(this.dataList.fWarehouseid)
-
       })
+      this.Warehouse = this.dataList[this.inDex].fWarehouseInformation
     },
     getAlltree(tree){
-      console.log(tree.id)
-      console.log(this.dataList)
-      this.$set(this.dataList[this.inDex], 'fWarehouseInformation', tree.fWarehouseInformation)
-      this.$set(this.dataList[this.inDex], 'fWarehouselocid', tree.id)
-      this.Warehouse = tree.fWarehouseInformation
-      console.log(this.dataList[this.inDex])
-      console.log(this.dataList[this.inDex].fWarehouseInformation)
-      console.log(this.dataList)
+      this.information = tree.fWarehouseInformation
+      this.informationId = tree.id
+      // this.$set(this.dataList[this.inDex], 'fWarehouseInformation', tree.fWarehouseInformation)
+      // this.$set(this.dataList[this.inDex], 'fWarehouselocid', tree.id)
     },
     confirm(){
+      this.$set(this.dataList[this.inDex], 'fWarehouseInformation', this.information)
+      this.$set(this.dataList[this.inDex], 'fWarehouselocid', this.informationId)
       this.choiceWarehouse = false
-      // console.log(this.dataList[0].fWarehouseid)
     },
     // 出库件数的计算
     qtyChange(row) {
@@ -3761,8 +3760,10 @@ export default {
         remarks: null,
         fMblno:this.form.fMblno,
         fProductName:this.form.fProductName,
-        fMarks:this.form.fMarks
+        fMarks:this.form.fMarks,
+        fBusinessType:this.$set(this.warehouseDrList,'fBusinessType',this.form.fBusinessType)
       });
+      console.log(this.warehouseDrList)
     },
     addpayment() {
       this.warehouseCrList.push({
@@ -3919,12 +3920,15 @@ export default {
             fTaxrate: this.fTaxrate,
             fMblno:this.form.fMblno,
             fProductName:this.form.fProductName,
-            fMarks:this.form.fMarks
+            fMarks:this.form.fMarks,
+            fBusinessType:this.$set(this.warehouseDrList,'fBusinessType',this.form.fBusinessType)
           });
         }
         for (let list in this.warehouseDrList) {
           if (this.warehouseDrList[list].fFeeUnitid === "1") {
             this.$set(this.warehouseDrList[list], "fQty", this.fQty.toFixed(2));
+            console.log("111111433543")
+            return
           } else if (this.warehouseDrList[list].fFeeUnitid === "2") {
             this.$set(this.warehouseDrList[list], "fQty", (this.fGrossweight/1000).toFixed(2));
           } else if (this.warehouseDrList[list].fFeeUnitid === "3") {
@@ -3932,8 +3936,7 @@ export default {
           } else {
             this.$set(this.warehouseDrList[list], "fQty", 0);
           }
-          this.$set(this.warehouseDrList[list], "fAmount", (Number(this.warehouseDrList[list].fUnitprice) * Number(this.warehouseDrList[list].fQty)).toFixed(2)
-          );
+          this.$set(this.warehouseDrList[list], "fAmount", (Number(this.warehouseDrList[list].fUnitprice) * Number(this.warehouseDrList[list].fQty)).toFixed(2));
         }
         this.warehousingagreement = false;
       }
@@ -3960,7 +3963,8 @@ export default {
             fTaxrate: this.fTaxrate,
             fMblno:this.form.fMblno,
             fProductName:this.form.fProductName,
-            fMarks:this.form.fMarks
+            fMarks:this.form.fMarks,
+            fBusinessType:this.$set(this.warehouseCrList,'fBusinessType',this.form.fBusinessType)
           });
         }
         for (let list in this.warehouseCrList) {
@@ -4180,7 +4184,7 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row, status) {
       this.reset();
-      // this.contrOl = false
+      this.contrOl = true
       // if (this.dataList.length === 0){
       //
       // }

+ 84 - 9
src/views/warehouseBusiness/outStock/index.vue

@@ -446,7 +446,22 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="仓库" prop="fWarehouseid">
-              <treeselect :disabled="browseStatus" style="width:80%" v-model="form.fWarehouseid" :options="warehousesOptions" :show-count="true" placeholder="请选择归属库区" />
+              <el-select
+                v-model="form.fWarehouseid"
+                filterable
+                remote
+                :disabled="browseStatus || formBrowseStatus"
+                style="width: 80%"
+                @keyup.enter.native="handleQuery"
+                placeholder="请选择"
+              >
+                <el-option
+                  v-for="(dict, index) in warehouseOptions"
+                  :key="index.fId"
+                  :label="dict.fName"
+                  :value="dict.fId"
+                ></el-option>
+              </el-select>
             </el-form-item>
           </el-col>
         </el-row>
@@ -693,7 +708,7 @@
               </el-form-item>
             </el-col>
           </el-row>
-                  <el-row>
+          <el-row>
           <el-col :span="8">
             <el-form-item label="单据编号" prop="fBillno">
               <el-input
@@ -944,14 +959,26 @@
               label="*属性详情"
             >
             </el-table-column>
+
             <el-table-column
-              prop="fWarehouselocids"
+              prop="fWarehouseInformation"
               header-align="center"
-              width="150px"
+              width="140px"
               align="center"
               label="*库区"
             >
+              <template slot-scope="scope">
+                <el-input
+                  placeholder="请选择"
+                  :disabled="!form.fWarehouseid || browseStatus || scope.row.fBillstatus === 20 || scope.row.fBillstatus === 30 || scope.row.fBillstatus === 40"
+                  v-model="scope.row.fWarehouseInformation"
+                  @focus="getTreeselect(scope)"
+                >
+                </el-input>
+              </template>
             </el-table-column>
+
+
             <el-table-column
               prop="fPlanqty"
               header-align="center"
@@ -2539,6 +2566,20 @@
         </div>
       </el-dialog>
     </el-dialog>
+    <el-dialog
+      title="选择库位"
+      :data="treeselectList"
+      :visible.sync="choiceWarehouse"
+      width="30%"
+      :before-close="hanDleclose">
+      <treeselect v-model="treeselectList.fWarehouselocid" @select="getAlltree" :options="fWarehouseidOptions" :show-count="true" :disable-branch-nodes="true" placeholder="请选择归属库区" />
+      <div>{{Warehouse}}</div>
+      <span slot="footer" class="dialog-footer">
+    <el-button @click="choiceWarehouse = false">取 消</el-button>
+    <el-button type="primary" @click="confirm">确 定</el-button>
+  </span>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -2595,6 +2636,11 @@ export default {
   },
   data() {
     return {
+      inDex:'',
+      Warehouse:'',
+      treeselectList:{
+        fWarehouselocid:null
+      },
       // 部门树选项
       warehousesOptions: [],
       //控制作业类型校验
@@ -2868,13 +2914,42 @@ export default {
     this.adoPt()
   },
   methods: {
+    hanDleclose(done){
+      this.$confirm('确认关闭?')
+        .then(_ => {
+          done();
+        })
+        .catch(_ => {});
+    },
     /** 查询部门下拉树结构 */
-    getTreeselect() {
-      treeselect().then(response => {
-        this.warehousesOptions = response.data;
-        console.log(this.warehousesOptions)
-      });
+    getTreeselect(row) {
+      console.log(row)
+      this.treeselectList.fWarehouselocid = null
+      this.inDex = row.$index
+      this.choiceWarehouse = true
+      treeselect(this.form.fWarehouseid).then(response => {
+        console.log(response)
+        this.fWarehouseidOptions = response.data;
+        console.log(this.fWarehouseidOptions)
+        // console.log(this.dataList.fWarehouseid)
+      })
+    },
+    //树状下拉选中事件
+    getAlltree(tree){
+      console.log(tree.id)
+      console.log(this.dataList)
+      this.$set(this.dataList[this.inDex], 'fWarehouseInformation', tree.fWarehouseInformation)
+      this.$set(this.dataList[this.inDex], 'fWarehouselocid', tree.id)
+      this.Warehouse = tree.fWarehouseInformation
+      console.log(this.dataList[this.inDex])
+      console.log(this.dataList[this.inDex].fWarehouseInformation)
+      console.log(this.dataList)
     },
+    confirm(){
+      this.choiceWarehouse = false
+      // console.log(this.dataList[0].fWarehouseid)
+    },
+
     //审批页面跳转
     adoPt(){
       this.approval = this.$route.query.data