qukaidi 3 yıl önce
ebeveyn
işleme
583cd6217a

+ 7 - 51
src/views/financing/inventory/config/customerContact.json → src/views/InventoryManagement/inventory/config/customerContact.json

@@ -17,7 +17,6 @@
       "prop": "containerNo",
       "label": "箱号",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -31,7 +30,6 @@
         "value": "id"
       },
       "dicData": [],
-      "cell": true,
       "width": 100
     },
     {
@@ -45,7 +43,6 @@
       },
       "dicData": [],
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -53,7 +50,6 @@
       "prop": "itemType",
       "label": "品牌",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -61,7 +57,6 @@
       "prop": "grade",
       "label": "等级",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -69,7 +64,6 @@
       "prop": "length",
       "label": "长度(mm)",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -77,7 +71,6 @@
       "prop": "width",
       "label": "宽度(mm)",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -85,7 +78,6 @@
       "prop": "thickness",
       "label": "厚度(mm)",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -93,7 +85,6 @@
       "prop": "widthItem",
       "label": "宽度明细(mm)",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -101,7 +92,6 @@
       "prop": "billNo",
       "label": "捆包号",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -109,69 +99,35 @@
       "prop": "sliceNumber",
       "label": "片数",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
       "index": 12,
-      "prop": "storageInQuantity",
-      "label": "出库量",
+      "prop": "inventory",
+      "label": "盘点量",
       "overHidden": true,
       "cell": true,
       "width": 100
     },
     {
       "index": 13,
-      "prop": "unit",
-      "label": "出库单位",
+      "prop": "balanceNumber",
+      "label": "结余量",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
       "index": 14,
-      "prop": "price",
-      "label": "出库单价",
-      "overHidden": true,
-      "cell": true,
-      "width": 100
-    },
-    {
-      "index": 15,
-      "prop": "storageAmount",
-      "label": "出库金额",
-      "overHidden": true,
-      "cell": true,
-      "width": 100
-    },
-    {
-      "index": 16,
-      "prop": "itemProp",
-      "label": "产地",
-      "overHidden": true,
-      "cell": true,
-      "width": 100
-    },
-    {
-      "index": 17,
-      "prop": "oneCode",
-      "label": "一维码",
-      "overHidden": true,
-      "width": 100
-    },
-    {
-      "index": 18,
-      "prop": "qRCode",
-      "label": "二维码",
+      "prop": "balanceMoney",
+      "label": "结余金额",
       "overHidden": true,
       "width": 100
     },
     {
-      "index": 24,
+      "index":  15,
       "prop": "remarks",
       "label": "备注",
       "overHidden": true,
-      "cell": true,
       "width": 100
     }
   ]

+ 96 - 0
src/views/InventoryManagement/inventory/config/mainList.json

@@ -0,0 +1,96 @@
+{
+  "searchShow": true,
+  "searchMenuSpan": 8,
+  "border": true,
+  "index": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "addBtn": false,
+  "headerAlign": "center",
+  "menuWidth": "70",
+  "showSummary": true,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "selection": true,
+  "tip": false,
+  "column": [
+    {
+      "label": "盘点单号",
+      "prop": "sysNo",
+      "index": 2,
+      "width": 120,
+      "search": true,
+      "searchSpan": 8,
+      "overHidden": true
+    },
+    {
+      "label": "盘点日期",
+      "prop": "stockTime",
+      "index": 4,
+      "width": 120,
+      "type": "date",
+      "format": "yyyy-MM-dd",
+      "search": true,
+      "searchSpan": 8,
+      "overHidden": true
+    },
+    {
+      "label": "盘点仓库",
+      "prop": "storageId",
+      "type": "cascader",
+      "props": {
+        "label": "title",
+        "value": "value"
+      },
+      "dicData": [],
+      "checkStrictly": true,
+      "showAllLevels": false,
+      "emitPath": false,
+      "index": 5,
+      "width": 120,
+      "search": true,
+      "searchSpan": 8,
+      "overHidden": true
+    },
+    {
+      "label": "制单人",
+      "prop": "salesName",
+      "index": 11,
+      "width": 120,
+      "overHidden": true
+    },
+    {
+      "label": "创建时间",
+      "prop": "createTime",
+      "index": 12,
+      "width": 120,
+      "overHidden": true
+    },
+    {
+      "label": "审核状态",
+      "prop": "status",
+      "index": 13,
+      "width": 120,
+      "type": "select",
+      "dataType": "number",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
+      "dicData": [],
+      "search": true,
+      "searchSpan": 8,
+      "overHidden": true
+    },
+    {
+      "label": "备注",
+      "prop": "orderRemark",
+      "index": 14,
+      "width": 120,
+      "search": true,
+      "searchSpan": 8,
+      "overHidden": true
+    }
+  ]
+}

+ 6 - 6
src/views/financing/inventory/config/mainList.json → src/views/InventoryManagement/inventory/config/mainList2.json

@@ -7,9 +7,9 @@
   "editBtn": false,
   "delBtn": false,
   "addBtn": false,
-  "menu":false,
   "headerAlign": "center",
-  "menuWidth": "70",
+  "menuWidth": "170",
+  "menu":false,
   "showSummary": true,
   "searchIcon": true,
   "searchIndex": 2,
@@ -26,7 +26,7 @@
       "overHidden": true
     },
     {
-      "label": "库单号",
+      "label": "库单号",
       "prop": "sysNo",
       "index": 2,
       "width": 120,
@@ -50,7 +50,7 @@
       "overHidden": true
     },
     {
-      "label": "库日期",
+      "label": "库日期",
       "prop": "stockTime",
       "index": 4,
       "width": 120,
@@ -106,14 +106,14 @@
       "overHidden": true
     },
     {
-      "label": "库量",
+      "label": "库量",
       "prop": "storageQuantity",
       "index": 9,
       "width": 120,
       "overHidden": true
     },
     {
-      "label": "库金额",
+      "label": "库金额",
       "prop": "storageAmount",
       "index": 10,
       "width": 120,

+ 16 - 87
src/views/financing/inventory/detailsPage.vue → src/views/InventoryManagement/inventory/detailsPage.vue

@@ -37,38 +37,23 @@
               :disabled="detailData.status == 1"></crop-select>
           </template>
           <template slot="storageId">
-            <el-cascader v-model="form.storageId" :options="storagetreeList" :show-all-levels="false" :disabled="detailData.status == 1"
+            <el-cascader v-model="form.storageId" :options="storagetreeList" :show-all-levels="false" disabled
               :props="{ checkStrictly: true, emitPath: false, label: 'title' }" clearable @change="storagetreeChange">
             </el-cascader>
           </template>
         </avue-form>
       </trade-card>
-      <trade-card title="出库明细">
+      <trade-card title="盘点明细">
         <avue-crud ref="crud" :data="itemsVOList" :option="tableOption" @row-del="rowDel" @saveColumn="saveColumn"
           @resetColumn="resetColumn" :cell-style="cellStyle">
-          <template slot="menuLeft">
-            <el-button type="primary" icon="el-icon-plus" size="small" :disabled="detailData.status == 1"
-              @click.stop="addRow">录入明细
-            </el-button>
-            <el-button type="success" icon="el-icon-bottom" size="small" @click.stop="getTemplate">下载模板
-            </el-button>
-            <el-button type="info" icon="el-icon-top" size="small" :disabled="detailData.status == 1"
-              @click.stop="addRow">导入
-            </el-button>
-          </template>
           <template slot="menu" slot-scope="{ row, index }">
             <div style="display:flex;justify-content: center;">
               <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
                 :disabled="disabled || detailData.status == 1">{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
-              <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
-                :disabled="detailData.status == 1">删除</el-button>
             </div>
           </template>
         </avue-crud>
       </trade-card>
-      <fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="detailData.status == 1"
-        feeUrl="/blade-purchase-sales/entranceOrder/removeOrderFees" optionType="JK" itemType="申请" :inCropId="true"
-        :tabShow="2" :billingShow="false" />
       <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 1" :orderFilesList="orderFilesList"
         delUrl="" />
       <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
@@ -86,6 +71,7 @@ import tableOption from "./config/customerContact.json";
 import feeInfo from "@/components/fee-info/main";
 import checkSchedule from "../../../components/check/checkSchedule";
 import uploadFile from "@/components/upload-file/main";
+import { getCurrentDate } from "@/util/date";
 import { getToken } from "@/util/auth";
 export default {
   name: "detailsPageEdit",
@@ -100,20 +86,7 @@ export default {
         labelWidth: 100,
         column: [
           {
-            label: "货权人",
-            prop: "purchaserId",
-            rules: [
-              {
-                required: true,
-                message: "",
-                trigger: "blur"
-              }
-            ],
-            span: 6
-          },
-
-          {
-            label: "出库日期",
+            label: "盘点日期",
             prop: "stockTime",
             type: "datetime",
             format: "yyyy-MM-dd HH:mm:ss",
@@ -128,7 +101,7 @@ export default {
             span: 6
           },
           {
-            label: "仓库",
+            label: "盘点仓库",
             prop: "storageId",
             rules: [
               {
@@ -140,33 +113,7 @@ export default {
             span: 6
           },
           {
-            label: "提单号",
-            prop: "billNo",
-            span: 6
-          },
-          {
-            label: "业务类型",
-            prop: "businessType",
-            type: "select",
-            props: {
-              label: "dictValue",
-              value: "dictKey"
-            },
-            dicData: [],
-            span: 6
-          },
-          {
-            label: "车船号",
-            prop: "vehicleShipNumber",
-            span: 6
-          },
-          {
-            label: "供应商",
-            prop: "corpId",
-            span: 6
-          },
-          {
-            label: "出库单号",
+            label: "盘点单号",
             prop: "sysNo",
             disabled: true,
             span: 6
@@ -194,7 +141,6 @@ export default {
         ]
       },
       itemsVOList: [],
-      orderFeesList: [],
       orderFilesList: [],
       subLoading: false,
       pageLoading: false,
@@ -219,6 +165,9 @@ export default {
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
+    if (this.detailData.generateId) {
+      this.getGenerate(this.detailData.generateId);
+    }
     this.tableOption = await this.getColumnData(
       this.getColumnName(197),
       tableOption
@@ -238,16 +187,6 @@ export default {
       this.findObject(this.tableOption.column, "itemId").dicData =
         res.data.data;
     })
-    if (this.$route.query.generateId) {
-      this.getGenerate(this.$route.query.generateId);
-    }
-  },
-  activated() {
-    setTimeout(() => {
-      if (this.$route.query.generateId) {
-        this.getGenerate(this.$route.query.generateId);
-      }
-    }, 100);
   },
   methods: {
     cellStyle() {
@@ -328,7 +267,6 @@ export default {
         .then(res => {
           this.form = res.data.data;
           this.itemsVOList = res.data.data.itemsVOList;
-          this.orderFeesList = res.data.data.orderFeesList;
           this.orderFilesList = res.data.data.orderFilesList;
           this.getStorage()
         })
@@ -341,24 +279,18 @@ export default {
       detail(id)
         .then(res => {
           delete res.data.data.id
+          delete res.data.data.stockTime
           delete res.data.data.createTime
           delete res.data.data.createUser
           delete res.data.data.createUserName
           delete res.data.data.sysNo
           delete res.data.data.status
+          res.data.data.stockTime=getCurrentDate()
           res.data.data.itemsVOList.forEach(e => {
             delete e.id
           })
-          // res.data.data.orderFeesList.forEach(e => {
-          //   delete e.id
-          // })
-          // res.data.data.orderFilesList.forEach(e => {
-          //   delete e.id
-          // })
           this.form = res.data.data;
           this.itemsVOList = res.data.data.itemsVOList;
-          // this.orderFeesList = res.data.data.orderFeesList;
-          // this.orderFilesList = res.data.data.orderFilesList;
           this.getStorage()
         })
         .finally(() => {
@@ -370,19 +302,16 @@ export default {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
-          let orderFeesList = this.$refs.feeInfo.submitData();
           this.subLoading = true;
           let data = {
             ...this.form,
-            billType: 'CK',
+            billType: 'PD',
             itemsVOList: this.itemsVOList,
-            orderFeesList: orderFeesList,
             orderFilesList: this.orderFilesList
           };
           submit(data).then(res => {
             this.form = res.data.data;
             this.itemsVOList = res.data.data.itemsVOList;
-            this.orderFeesList = res.data.data.orderFeesList;
             this.orderFilesList = res.data.data.orderFilesList;
             this.$message({
               type: "success",
@@ -407,11 +336,11 @@ export default {
         this.buttonLoading = true
         const data = {
           id: this.form.id,
-          checkType: 'CK',
-          url: '/salesManagement/outStock/index',
+          checkType: 'PD',
+          url: '/InventoryManagement/inventory/index',
           pageStatus: "this.$store.getters.entranceXsStatus",
-          pageLabel: "出库管理",
-          checkFlag: 2,
+          pageLabel: "库内盘点",
+          checkFlag: 3,
         }
         checkWarehousing(data).then(res => {
           if (res.data.success) {

+ 104 - 12
src/views/financing/inventory/index.vue → src/views/InventoryManagement/inventory/index.vue

@@ -5,11 +5,11 @@
                 :search.sync="search" @search-change="searchChange" @current-change="currentChange"
                 @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading"
                 @saveColumn="saveColumn" @resetColumn="resetColumn" :cell-style="cellStyle"
-                @selection-change="selectionChange" @search-criteria-switch="searchCriteriaSwitch">
-                <!-- <template slot="menuLeft">
+                @search-criteria-switch="searchCriteriaSwitch">
+                <template slot="menuLeft">
                     <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newAdd()">创建单据
                     </el-button>
-                </template> -->
+                </template>
                 <template slot-scope="{ row,index}" slot="menu">
                     <el-button type="text" icon="el-icon-delete" size="small" @click.stop="rowDel(row, index)">删除
                     </el-button>
@@ -19,13 +19,7 @@
                         end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd">
                     </el-date-picker>
                 </template>
-                <template slot="purchaserIdSearch">
-                    <crop-select v-model="search.purchaserId" corpType="KH" :refresh="false"></crop-select>
-                </template>
-                <template slot="corpIdSearch">
-                    <crop-select v-model="search.corpId" corpType="GYS" :refresh="false"></crop-select>
-                </template>
-                <template slot-scope="{ row,index}" slot="purchaserId">
+                <template slot-scope="{ row,index}" slot="sysNo">
                     <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.purchaser }}
                     </span>
                 </template>
@@ -35,6 +29,28 @@
                 </template>
             </avue-crud>
         </basic-container>
+        <el-dialog title="入库列表页" :visible.sync="inStockVisible" width="70%" @close="close" append-to-body>
+            <span>
+                <avue-crud ref="crud2" v-model="form2" :data="itemData" :option="itemOption" :page.sync="page2" :search.sync="search2"
+                    @search-change="searchChange2" @current-change="currentChange2" @size-change="sizeChange2"
+                    @refresh-change="refreshChange2" @on-load="onLoad2" :table-loading="loading2"
+                    :cell-style="cellStyle" @selection-change="selectionChange"
+                    @search-criteria-switch="searchCriteriaSwitch2">
+                    <template slot-scope="{ row,index}" slot="purchaserId">
+                        <span>{{ row.purchaser }}
+                        </span>
+                    </template>
+                    <template slot-scope="{ row,index}" slot="corpId">
+                        <span>{{ row.corpName }}
+                        </span>
+                    </template>
+                </avue-crud>
+            </span>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="inStockVisible= false">取 消</el-button>
+                <el-button type="primary" @click="generate">生 成</el-button>
+            </span>
+        </el-dialog>
         <detail-page @goBack="goBack" :detailData="detailData" v-if="!show"></detail-page>
     </div>
 </template>
@@ -42,26 +58,39 @@
 <script>
 import { getList, remove, getStoragetree } from "@/api/purchasingManagement/inStock";
 import option from "./config/mainList.json";
+import itemOption from "./config/mainList2.json";
 import detailPage from "./detailsPage";
 import _ from "lodash";
 export default {
     name: "instock",
     data() {
         return {
+            itemOption: itemOption,
             search: {},
+            search2: {},
             form: {},
+            form2:{},
             option: {},
             dataList: [],
+            itemData: [],
             page: {
                 pageSize: 20,
                 currentPage: 1,
                 total: 0,
                 pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
             },
+            page2: {
+                pageSize: 20,
+                currentPage: 1,
+                total: 0,
+                pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+            },
             show: true,
             detailData: {},
             loading: false,
+            loading2: false,
             searchShow: true,
+            inStockVisible: false,
             selectionList: [],
         };
     },
@@ -69,6 +98,7 @@ export default {
     async created() {
         this.option = await this.getColumnData(this.getColumnName(190), option);
         this.option.height = window.innerHeight - 210;
+        this.itemOption.height = window.innerHeight - 410;
         this.getWorkDicts("approval_status").then(res => {
             this.findObject(this.option.column, "status").dicData =
                 res.data.data;
@@ -81,6 +111,18 @@ export default {
             this.findObject(this.option.column, "storageId").dicData =
                 res.data.data;
         })
+        this.getWorkDicts("approval_status").then(res => {
+            this.findObject(this.itemOption.column, "status").dicData =
+                res.data.data;
+        });
+        this.getWorkDicts("CMY_business_type").then(res => {
+            this.findObject(this.itemOption.column, "businessType").dicData =
+                res.data.data;
+        });
+        getStoragetree().then(res => {
+            this.findObject(this.itemOption.column, "storageId").dicData =
+                res.data.data;
+        })
     },
     activated() {
         console.log(this.show)
@@ -100,6 +142,14 @@ export default {
             }
             this.$refs.crud.getTableHeight();
         },
+        searchCriteriaSwitch2(type) {
+            if (type) {
+                this.itemOption.height = this.itemOption.height - 191;
+            } else {
+                this.itemOption.height = this.itemOption.height + 191;
+            }
+            this.$refs.crud2.getTableHeight();
+        },
         cellStyle() {
             return "padding:0;height:40px;";
         },
@@ -124,6 +174,17 @@ export default {
         selectionChange(list) {
             this.selectionList = list;
         },
+        generate() {
+            if (this.selectionList.length == 1) {
+                this.detailData = {
+                    generateId: this.selectionList[0].id,
+                }
+                this.show = false
+                this.inStockVisible = false
+            } else {
+                this.$message.error('请选择一条数据')
+            }
+        },
         editOpen(row, status) {
             this.detailData = {
                 id: row.id,
@@ -137,16 +198,28 @@ export default {
             this.onLoad(this.page, params);
             done();
         },
+        searchChange2(params, done) {
+            this.page2.currentPage = 1;
+            this.onLoad2(this.page, params);
+            done();
+        },
         currentChange(val) {
             this.page.currentPage = val;
         },
+        currentChange2(val) {
+            this.page2.currentPage = val;
+        },
         sizeChange(val) {
             this.page.currentPage = 1;
             this.page.pageSize = val;
         },
+        sizeChange2(val) {
+            this.page2.currentPage = 1;
+            this.page2.pageSize = val;
+        },
         onLoad(page, params) {
             let data = this.deepClone(Object.assign({}, params, this.search));
-            data.billType = "CK"
+            data.billType = "PD"
             this.loading = true;
             getList(page.currentPage, page.pageSize, data)
                 .then(res => {
@@ -157,11 +230,27 @@ export default {
                     this.loading = false;
                 });
         },
+        onLoad2(page, params) {
+            let data = this.deepClone(Object.assign({}, params, this.search2));
+            data.billType = "RK"
+            this.loading2 = true;
+            getList(page.currentPage, page.pageSize, data)
+                .then(res => {
+                    this.itemData = res.data.data.records ? res.data.data.records : [];
+                    this.page2.total = res.data.data.total;
+                })
+                .finally(() => {
+                    this.loading2 = false;
+                });
+        },
         refreshChange() {
             this.onLoad(this.page, this.search);
         },
+        refreshChange2() {
+            this.onLoad2(this.page2, this.search2);
+        },
         newAdd() {
-            this.show = false;
+            this.inStockVisible = true;
         },
         goBack() {
             if (this.$route.query.id) {
@@ -174,6 +263,9 @@ export default {
             this.show = true;
             this.onLoad(this.page, this.search);
         },
+        close() {
+            this.$refs.crud2.refreshTable()
+        },
         async saveColumn() {
             const inSave = await this.saveColumnData(
                 this.getColumnName(190),

+ 1 - 0
src/views/approveData/index.vue

@@ -26,6 +26,7 @@
         <span v-else-if="scope.row.checkType == 'xsjh'">销售机会请核</span>
         <span v-else-if="scope.row.checkType == 'RK'">入库管理审核</span>
         <span v-else-if="scope.row.checkType == 'CK'">出库管理审核</span>
+        <span v-else-if="scope.row.checkType == 'PD'">库内盘点审核</span>
       </template>
       <template slot="menuLeft">
         <el-button size="small" type="success" :disabled="selectionList.length == 0" @click.stop="batchCheck">批量审批

+ 1 - 1
src/views/purchasingManagement/inStock/detailsPage.vue

@@ -371,7 +371,7 @@ export default {
           url: '/purchasingManagement/inStock/index',
           pageStatus: "this.$store.getters.entranceXsStatus",
           pageLabel: "入库管理",
-          checkFlag: 2,
+          checkFlag: 1,
         }
         checkWarehousing(data).then(res => {
           if (res.data.success) {