Browse Source

仓库树状结构修改

wengyuwen 4 years ago
parent
commit
14334ef755

+ 18 - 17
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -430,21 +430,7 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="仓库" prop="fWarehouseid">
-              <el-select
-                v-model="form.fWarehouseid"
-                filterable
-                :disabled="notChange || formBrowseStatus"
-                remote
-                style="width: 80%"
-                :remote-method="warehouseRemoteMethod"
-                placeholder="请选择仓库">
-                <el-option
-                  v-for="(dict, index) in warehouseOptions"
-                  :key="index.fId"
-                  :label="dict.fName"
-                  :value="dict.fId"
-                ></el-option>
-              </el-select>
+              <treeselect style="width:80%" v-model="form.fWarehouseid" :options="warehousesOptions" :show-count="true" placeholder="请选择归属库区" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -1621,7 +1607,7 @@
 
   import { listFees } from '@/api/basicdata/fees'
 
-  import { listWarehouse } from '@/api/basicdata/warehouse'
+  import { listWarehouse, treeselect } from '@/api/basicdata/warehouse'
 
   import { listArea } from '@/api/basicdata/area'
 
@@ -1637,16 +1623,21 @@
   import ApprovalComments from '@/views/startApproval'
   import Global from '@/layout/components/global'
   import { getAgreement } from '@/api/warehouseBusiness/agreement'
+  import Treeselect from '@riophae/vue-treeselect'
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
   export default {
     name: 'goodsTransfer',
     components: {
       UploadFile,
       AddOrUpdate,
-      ApprovalComments
+      ApprovalComments,
+      Treeselect
     },
     data() {
       return {
+        //仓库树状图
+        warehousesOptions:undefined,
         Lander:'',
         Operator:'',
         colseButton:true,
@@ -1875,6 +1866,12 @@
       this.Jump()
     },
     methods: {
+      /** 查询部门下拉树结构 */
+      getTreeselect() {
+        treeselect().then(response => {
+          this.warehousesOptions = response.data;
+        });
+      },
       // 撤销审核
       backrRconciliation(){
         this.form.fBillstatus = '1'
@@ -1901,6 +1898,7 @@
       Jump(){
         this.approval = this.$route.query.data
         if(this.approval){
+          this.getTreeselect()
           this.reset()
           this.colseButton = false
           this.approval = JSON.parse(this.approval)
@@ -2324,6 +2322,7 @@
       },
       /** 新增按钮操作 */
       handleAdd() {
+        this.getTreeselect()
         this.reset()
         this.notChange = false
         this.browseStatus = false
@@ -2336,6 +2335,7 @@
         this.title = '货权转移'
       },
       check_s(row) {
+        this.getTreeselect()
         this.disappear = true
         this.notChange = true
         this.browseStatus = true
@@ -2437,6 +2437,7 @@
 
       /** 修改按钮操作 */
       handleUpdate(row, status) {
+        this.getTreeselect()
         this.reset()
         this.notChange = false
         this.browseStatus = status

+ 15 - 3
src/views/warehouseBusiness/inStock/index.vue

@@ -49,6 +49,7 @@
         >
         </el-date-picker>
       </el-form-item>
+
       <el-form-item label="贸易方式" prop="fTrademodeid">
         <el-select
           v-model="queryParams.fTrademodeid"
@@ -459,8 +460,8 @@
           </el-col>
 
           <el-col :span="8">
-            <el-form-item label="归属库区" prop="fWarehouseid">
-              <treeselect v-model="form.fWarehouseid" :options="warehousesOptions" :show-count="true" placeholder="请选择归属库区" />
+            <el-form-item label="仓库" prop="fWarehouseid">
+              <treeselect style="width:80%" v-model="form.fWarehouseid" :options="warehousesOptions" :show-count="true" placeholder="请选择归属库区" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -1014,6 +1015,14 @@
                 </template>
               </el-table-column>
               <el-table-column
+                prop="fMblno"
+                header-align="center"
+                align="center"
+                width="140px"
+                label="提单号"
+              >
+              </el-table-column>
+              <el-table-column
                 prop="fGoodsid"
                 header-align="center"
                 align="center"
@@ -3121,7 +3130,7 @@ export default {
           trigger: "blur",
         },
         // fleet:[{required: this.isrequired == '1' ? true : false,message: " ", trigger: "blur"}],
-        // fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
+        fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
         fbillingway: [
           {
             required: true,
@@ -3211,6 +3220,7 @@ export default {
     adoPt(){
       this.approval = this.$route.query.data
       if (this.approval){
+        this.getTreeselect()
         this.reset();
         this.doNot = true
         this.closeButton = false
@@ -3760,6 +3770,7 @@ export default {
         fDriverIdCar: fDriverIdCar,
         remark: null,
         fBillstatus: 10,
+        fMblno:this.form.fMblno
       });
       this.weightList = false;
       // this.contrOl = true
@@ -4047,6 +4058,7 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row, status) {
+      this.getTreeselect();
       this.reset();
       // this.contrOl = false
       // if (this.dataList.length === 0){

+ 45 - 19
src/views/warehouseBusiness/outStock/index.vue

@@ -446,23 +446,7 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="仓库" prop="fWarehouseid">
-              <el-select
-                v-model="form.fWarehouseid"
-                filterable
-                remote
-                @change="changefWarehouseid(form)"
-                :disabled="browseStatus || formBrowseStatus"
-                style="width: 80%"
-                :remote-method="warehouseRemoteMethod"
-                placeholder="请输入模糊查找"
-              >
-                <el-option
-                  v-for="(dict, index) in warehouseOptions"
-                  :key="index.fId"
-                  :label="dict.fName"
-                  :value="dict.fId"
-                ></el-option>
-              </el-select>
+              <treeselect style="width:80%" v-model="form.fWarehouseid" :options="warehousesOptions" :show-count="true" placeholder="请选择归属库区" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -870,6 +854,33 @@
             <el-table-column type="selection" width="55" align="center" />
             <el-table-column label="序号" type="index" width="80">
             </el-table-column>
+
+            <el-table-column
+              prop="fBsdate"
+              header-align="center"
+              align="center"
+              width="150px"
+              label="入库日期"
+            >
+              <template slot-scope="scope">
+                <el-date-picker
+                  v-model="scope.row.fBsdate"
+                  style="width: 138px"
+                  :disabled="
+                    browseStatus ||
+                    scope.row.fBillstatus === 20 ||
+                    scope.row.fBillstatus === 30 ||
+                    scope.row.fBillstatus === 40
+                  "
+                  type="date"
+                  value-format="timestamp"
+                  placeholder="业务日期"
+                >
+                </el-date-picker>
+              </template>
+            </el-table-column>
+
+
             <el-table-column
               prop="fMblno"
               header-align="center"
@@ -2541,7 +2552,7 @@ import { listCorps } from "@/api/basicdata/corps";
 
 import { listFees, getFees } from "@/api/basicdata/fees";
 
-import { listWarehouse } from "@/api/basicdata/warehouse";
+import { listWarehouse, treeselect } from '@/api/basicdata/warehouse'
 
 import { listArea } from "@/api/basicdata/area";
 
@@ -2555,6 +2566,8 @@ import { listWhgenleg } from "@/api/reportManagement/whgenleg";
 import Global from '@/layout/components/global'
 import AddOrUpdate from "@/views/viewApproval";
 import ApprovalComments from '@/views/startApproval'
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
 export default {
   name: "Warehousebills",
@@ -2562,9 +2575,12 @@ export default {
     UploadFile,
     AddOrUpdate,
     ApprovalComments,
+    Treeselect
   },
   data() {
     return {
+      // 部门树选项
+      warehousesOptions: undefined,
       //控制作业类型校验
       isrequired:2,
       isrequired_s:2,
@@ -2778,7 +2794,7 @@ export default {
           message: " ",
           trigger: "blur",
         },
-        // fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
+        fWarehouseid: [{ required: true, message: " ", trigger: "blur" }],
         // fBscorpno: [
         //   { required: true, message: "请输入存货编号", trigger: "blur" },
         // ],
@@ -2836,9 +2852,17 @@ export default {
     this.adoPt()
   },
   methods: {
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.warehousesOptions = response.data;
+      });
+    },
+    //审批页面跳转
     adoPt(){
       this.approval = this.$route.query.data
       if (this.approval){
+        this.getTreeselect()
         this.reset();
         this.doNot = true
         this.closeButton = false
@@ -3630,6 +3654,7 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd(status) {
+      this.getTreeselect();
       this.reset();
       this.browseStatus = status;
       this.queryUser();
@@ -3646,6 +3671,7 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row, status) {
+      this.getTreeselect();
       this.reset();
       // if (this.dataList.length === 0){
       //   this.contrOl = true

+ 18 - 19
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -431,23 +431,7 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="调入仓库" prop="fWarehouseid">
-              <el-select
-                v-model="form.fWarehouseid"
-                filterable
-                remote
-                @change="changefWarehouseid(form)"
-                :disabled="browseStatus || formBrowseStatus"
-                style="width: 80%"
-                :remote-method="warehouseRemoteMethod"
-                placeholder="请输入模糊查找"
-              >
-                <el-option
-                  v-for="(dict, index) in warehouseOptions"
-                  :key="index.fId"
-                  :label="dict.fName"
-                  :value="dict.fId"
-                ></el-option>
-              </el-select>
+              <treeselect style="width:80%" v-model="form.fWarehouseid" :options="warehousesOptions" :show-count="true" placeholder="请选择归属库区" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -2202,7 +2186,7 @@ import { listCorps } from "@/api/basicdata/corps";
 
 import { listFees, getFees } from "@/api/basicdata/fees";
 
-import { listWarehouse } from "@/api/basicdata/warehouse";
+import { listWarehouse, treeselect } from '@/api/basicdata/warehouse'
 
 import { listArea } from "@/api/basicdata/area";
 
@@ -2216,16 +2200,21 @@ import { listWhgenleg } from "@/api/reportManagement/whgenleg";
 import Global from '@/layout/components/global'
 import AddOrUpdate from '@/views/viewApproval'
 import ApprovalComments from '@/views/startApproval'
+import Treeselect from '@riophae/vue-treeselect'
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
 export default {
   name: "Warehousebills",
   components: {
     UploadFile,
     AddOrUpdate,
-    ApprovalComments
+    ApprovalComments,
+    Treeselect
   },
   data() {
     return {
+      //仓库树状图
+      warehousesOptions:undefined,
       activeNames:['1'],
       //作业类型校验
       isrequired:2,
@@ -2492,6 +2481,12 @@ export default {
     this.Jump()
   },
   methods: {
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.warehousesOptions = response.data;
+      });
+    },
     // 撤销审核
     backrRconciliation(){
       this.form.fBillstatus = '1'
@@ -2518,6 +2513,7 @@ export default {
     Jump(){
       this.approval = this.$route.query.data
       if(this.approval){
+        this.getTreeselect()
         this.reset()
         this.colseButton = false
         this.approval = JSON.parse(this.approval)
@@ -3230,6 +3226,7 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd(status) {
+      this.getTreeselect()
       this.reset();
       this.browseStatus = status;
       this.notChange = false
@@ -3244,6 +3241,7 @@ export default {
       this.formBrowseStatus = false;
     },
     check_s(row,status){
+      this.getTreeselect()
       // this.disappear = true
       // this.notChange = true
       this.reset();
@@ -3411,6 +3409,7 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row, status) {
+      this.getTreeselect()
       this.reset();
       this.browseStatus = status;
       this.detailsHidden = false;