Browse Source

提交陆运和出入库管理页面

caojunjie 2 years ago
parent
commit
601bbcb357

+ 8 - 1
src/api/purchasingManagement/inStock.js

@@ -93,4 +93,11 @@ export function revokeWarehousing(data) {
         method: 'post',
         data: data
     })
-}
+}
+export function withdraw(data) {
+    return request({
+        url: '/api/trade-purchase/woodHarvestingCloud/withdraw',
+        method: 'get',
+        params: data
+    })
+}

+ 0 - 4
src/views/landTransportation/bulkCargo/detailPage.vue

@@ -2271,7 +2271,6 @@ export default {
           this.tableData.forEach(item => item.id = '')
           this.tableDataTwo.forEach(item => item.id = '')
           this.entrustList.forEach(item => item.id = '')
-          this.goodsList.forEach(item => item.id = '')
           this.vehicleList.forEach(item => item.id = '')
           this.orderFilesList.forEach(item => item.id = '')
           //查询业务员
@@ -2294,7 +2293,6 @@ export default {
           this.tableData = res.data.data.loadingAddressList || []
           this.tableDataTwo = res.data.data.unloadedAddressList || []
           this.entrustList = res.data.data.itemList
-          this.goodsList = res.data.data.itemList
           this.vehicleList = res.data.data.orderItemList
           this.orderFilesList = res.data.data.fileList || []
 
@@ -2338,7 +2336,6 @@ export default {
           this.tableData = res.data.data.loadingAddressList || []
           this.tableDataTwo = res.data.data.unloadedAddressList || []
           this.entrustList = res.data.data.itemList
-          this.goodsList = res.data.data.itemList
           this.vehicleList = res.data.data.orderItemList
           this.orderFilesList = res.data.data.fileList || []
 
@@ -2647,7 +2644,6 @@ export default {
         this.tableData = res.data.data.loadingAddressList
         this.tableDataTwo = res.data.data.unloadedAddressList
         this.entrustList = res.data.data.itemList
-        this.goodsList = res.data.data.itemList
         this.vehicleList = res.data.data.orderItemList
         this.orderFilesList = res.data.data.fileList || []
         this.oldgoodsForm = res.data.data

+ 33 - 5
src/views/purchasingManagement/inStock/config/customerContact.json

@@ -297,26 +297,54 @@
           "value": "0"
         },
         {
-          "label": "库",
+          "label": "待入库",
           "value": "1"
         },
         {
-          "label": "库中",
+          "label": "库中",
           "value": "2"
         },
         {
-          "label": "待扫描",
+          "label": "在库",
           "value": "3"
         },
         {
-          "label": "已出库",
+          "label": "计划",
           "value": "4"
+        },
+        {
+          "label": "待出库",
+          "value": "5"
+        },
+        {
+          "label": "出库中",
+          "value": "6"
+        },
+        {
+          "label": "已出库",
+          "value": "7"
         }
       ],
       "width": 100
     },
     {
       "index": 24,
+      "prop": "forklift",
+      "label": "叉车工",
+      "overHidden": true,
+      "cell": true,
+      "width": 100
+    },
+    {
+      "index": 25,
+      "prop": "carry",
+      "label": "搬运工",
+      "overHidden": true,
+      "cell": true,
+      "width": 100
+    },
+    {
+      "index": 26,
       "prop": "remarks",
       "label": "备注",
       "overHidden": true,
@@ -324,4 +352,4 @@
       "width": 100
     }
   ]
-}
+}

+ 61 - 10
src/views/purchasingManagement/inStock/detailsPage.vue

@@ -7,12 +7,18 @@
         </el-button>
       </div>
       <div class="add-customer-btn">
+        <el-button type="primary" size="small" :disabled="form.status>0" v-if="form.status < 1"
+          class="el-button--small-yh " @click.stop="openEdit">编辑
+        </el-button>
         <el-button type="info" @click="getData" size="small">刷新资料
         </el-button>
-        <el-button type="primary" size="small" :disabled="form.status>0" v-if="detailData.status == 1"
-          class="el-button--small-yh " @click.stop="openEdit">编辑
+        <el-button type="primary" size="small" v-if="form.status == 0"
+                   class="el-button--small-yh " @click.stop="withdraw(0)">提交
+        </el-button>
+        <el-button type="primary" size="small" v-if="form.status == 1"
+                   class="el-button--small-yh " @click.stop="withdraw(1)">撤销
         </el-button>
-        <el-button type="primary" @click="editCustomer" :loading="subLoading" v-if="detailData.status != 1"
+        <el-button type="primary" @click="editCustomer" :loading="subLoading" v-if="!(form.status > 0)"
           size="small">保存数据
         </el-button>
         <el-dropdown style="padding: 0 6px;line-height: 0">
@@ -20,12 +26,11 @@
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">提交审核</el-dropdown-item>
-            <el-dropdown-item v-if="roleName=='admin'" :disabled="form.status<1" @click.native="revokeCheck">撤销审核
+            <el-dropdown-item :disabled="form.status != 2" @click.native="auditCheck">提交审核</el-dropdown-item>
+            <el-dropdown-item v-if="roleName=='admin'" :disabled="form.status != 5" @click.native="revokeCheck">撤销审核</el-dropdown-item>
+            <el-dropdown-item :disabled="form.status < 3" @click.native="checkScheduleDialog = true">审核进度
             </el-dropdown-item>
-            <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
-            </el-dropdown-item>
-            <el-dropdown-item v-if="$route.query.check" :disabled="form.status==3" @click.native="check">审批数据
+            <el-dropdown-item v-if="$route.query.check" :disabled="!(form.status > 2 && form.status < 5)" @click.native="check">审批数据
             </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
@@ -67,7 +72,7 @@
               @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||!form.id"
+            <el-button type="info" icon="el-icon-top" size="small" :disabled="detailData.status == 1&&form.id"
               @click.stop="excelBox = true">导入
             </el-button>
           </template>
@@ -160,7 +165,7 @@
 </template>
 
 <script>
-import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, delItem, revokeWarehousing } from "@/api/purchasingManagement/inStock";
+import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, delItem, revokeWarehousing, withdraw} from "@/api/purchasingManagement/inStock";
 import tableOption from "./config/customerContact.json";
 import feeInfo from "@/components/fee-info/main";
 import checkSchedule from "../../../components/check/checkSchedule";
@@ -486,6 +491,52 @@ export default {
     rowPrint(row) {
       this.$router.push(`/myiframe/urlPath?name=preview-木材管理-入库垛卡.ureport.xml&src=${this.website.reportUrl}/preview?_u=blade-木材管理-入库垛卡.ureport.xml&id=${row.id}`);
     },
+    //提交撤销
+    withdraw(type){
+      if (type == 0){
+        this.$confirm("是否确认提交?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.subLoading = true;
+          withdraw({
+            id:this.form.id,
+            type:"RK",
+            status:1,
+            isIssue:1
+          }).then(res=>{
+            this.$message({
+              type: "success",
+              message: "提交成功!"
+            });
+            this.getDetail(this.form.id);
+            this.subLoading = false;
+          })
+        })
+      }else {
+        this.$confirm("是否确认撤销?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.subLoading = true;
+          withdraw({
+            id:this.form.id,
+            type:"RK",
+            status:0,
+            isIssue:0
+          }).then(res=>{
+            this.$message({
+              type: "success",
+              message: "撤销成功!"
+            });
+            this.getDetail(this.form.id);
+            this.subLoading = false;
+          })
+        })
+      }
+    },
     //修改提交触发
     editCustomer(status) {
       this.$refs["form"].validate((valid, done) => {

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

@@ -11,7 +11,7 @@
                     </el-button>
                 </template>
                 <template slot-scope="{ row,index}" slot="menu">
-                    <el-button type="text" icon="el-icon-plus" size="small" :disabled="row.status!=3"
+                    <el-button type="text" icon="el-icon-plus" size="small" :disabled="row.status!=5"
                         @click.stop="generate(row, index)">生成出库单
                     </el-button>
                     <el-button type="text" icon="el-icon-delete" size="small" :disabled="row.status>0"

+ 34 - 21
src/views/salesManagement/outStock/config/customerContact.json

@@ -11,7 +11,7 @@
   "menuWidth": 160,
   "refreshBtn": false,
   "showSumary": true,
-  "indexSlot": true,
+  "indexSlot": false,
   "sumaryText": "合计",
   "sumColumnList": [
     {
@@ -41,7 +41,6 @@
       "prop": "containerNo",
       "label": "箱号",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -56,7 +55,6 @@
       },
       "dicData": [],
       "filterable":true,
-      "cell": true,
       "rules": [
         {
           "required": true,
@@ -78,7 +76,6 @@
       "dicData": [],
       "overHidden": true,
       "filterable":true,
-      "cell": true,
       "rules": [
         {
           "required": true,
@@ -93,7 +90,6 @@
       "prop": "itemType",
       "label": "*品牌",
       "overHidden": true,
-      "cell": true,
       "rules": [
         {
           "required": true,
@@ -108,7 +104,6 @@
       "prop": "grade",
       "label": "*等级",
       "overHidden": true,
-      "cell": true,
       "rules": [
         {
           "required": true,
@@ -123,7 +118,6 @@
       "prop": "length",
       "label": "长度(m)",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -131,7 +125,6 @@
       "prop": "thickness",
       "label": "厚度(m)",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -139,7 +132,6 @@
       "prop": "billNo",
       "label": "*捆包号",
       "overHidden": true,
-      "cell": true,
       "rules": [
         {
           "required": true,
@@ -154,7 +146,6 @@
       "prop": "sliceNumber",
       "label": "*片数",
       "overHidden": true,
-      "cell": true,
       "type":"number",
       "controls":false,
       "precision":0,
@@ -179,7 +170,6 @@
           "trigger": "blur"
         }
       ],
-      "cell": true,
       "width": 100
     },
     {
@@ -200,7 +190,6 @@
           "trigger": "blur"
         }
       ],
-      "cell": true,
       "width": 100
     },
     {
@@ -208,7 +197,6 @@
       "prop": "price",
       "label": "*出库单价",
       "overHidden": true,
-      "cell": true,
       "rules": [
         {
           "required": true,
@@ -223,7 +211,6 @@
       "prop": "storageAmount",
       "label": "出库金额",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -231,7 +218,6 @@
       "prop": "itemProp",
       "label": "产地",
       "overHidden": true,
-      "cell": true,
       "width": 100
     },
     {
@@ -252,26 +238,53 @@
           "value": "0"
         },
         {
-          "label": "库",
+          "label": "待入库",
           "value": "1"
         },
         {
-          "label": "库中",
+          "label": "库中",
           "value": "2"
         },
         {
-          "label": "待扫描",
+          "label": "在库",
           "value": "3"
         },
         {
-          "label": "已出库",
+          "label": "计划",
           "value": "4"
+        },
+        {
+          "label": "待出库",
+          "value": "5"
+        },
+        {
+          "label": "出库中",
+          "value": "6"
+        },
+        {
+          "label": "已出库",
+          "value": "7"
         }
       ],
       "width": 100
+    },{
+      "index": 24,
+      "prop": "forklift",
+      "label": "叉车工",
+      "overHidden": true,
+      "cell": true,
+      "width": 100
     },
     {
-      "index": 24,
+      "index": 25,
+      "prop": "carry",
+      "label": "搬运工",
+      "overHidden": true,
+      "cell": true,
+      "width": 100
+    },
+    {
+      "index": 26,
       "prop": "remarks",
       "label": "备注",
       "overHidden": true,
@@ -279,4 +292,4 @@
       "width": 100
     }
   ]
-}
+}

+ 46 - 34
src/views/salesManagement/outStock/detailsPage.vue

@@ -9,10 +9,10 @@
       <div class="add-customer-btn">
         <el-button type="info" @click="getData" size="small">刷新资料
         </el-button>
-        <el-button type="primary" size="small" :disabled="form.status>0" v-if="detailData.status == 1"
+        <el-button type="primary" size="small" :disabled="form.status>0" v-if="detailData.status == 3"
           class="el-button--small-yh " @click.stop="openEdit">编辑
         </el-button>
-        <el-button type="primary" @click="editCustomer" :loading="subLoading" v-if="detailData.status != 1"
+        <el-button type="primary" @click="editCustomer" :loading="subLoading" v-if="detailData.status != 3"
           size="small">保存数据
         </el-button>
         <el-dropdown style="padding: 0 6px;line-height: 0">
@@ -20,11 +20,11 @@
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">提交审核</el-dropdown-item>
-            <el-dropdown-item v-if="roleName=='admin'" :disabled="form.status<1" @click.native="revokeCheck">撤销审核</el-dropdown-item>
+            <el-dropdown-item :disabled="!(form.status == 0 || form.status == 2)" @click.native="auditCheck">提交审核</el-dropdown-item>
+            <el-dropdown-item v-if="roleName=='admin'" :disabled="!(form.status==8 || form.status==5)" @click.native="revokeCheck">撤销审核</el-dropdown-item>
             <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
             </el-dropdown-item>
-            <el-dropdown-item v-if="$route.query.check" :disabled="form.status==3" @click.native="check">审批数据
+            <el-dropdown-item v-if="$route.query.check" :disabled="form.status == 0" @click.native="check">审批数据
             </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
@@ -35,15 +35,15 @@
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="purchaserId">
             <crop-select ref="purchaser" v-model="form.purchaserId" corpType="KH" :refresh="false"
-              @getCorpData="getKHData" :disabled="detailData.status == 1"></crop-select>
+              @getCorpData="getKHData" :disabled="form.status > 0"></crop-select>
           </template>
           <template slot="corpId">
             <crop-select ref="corpId" v-model="form.corpId" corpType="GYS" :refresh="false" @getCorpData="getGYSData"
-              :disabled="detailData.status == 1"></crop-select>
+              :disabled="form.status > 0"></crop-select>
           </template>
           <template slot="storageId">
             <el-cascader v-model="form.storageId" :options="storagetreeList" :show-all-levels="false"
-              :disabled="detailData.status == 1" :props="{ checkStrictly: true, emitPath: false, label: 'title' }"
+              :disabled="form.status > 0" :props="{ checkStrictly: true, emitPath: false, label: 'title' }"
               clearable @change="storagetreeChange">
             </el-cascader>
           </template>
@@ -62,20 +62,20 @@
         <avue-crud ref="crud" :data="itemsVOList" :option="tableOption" @row-del="rowDel" @saveColumn="saveColumn"
           @resetColumn="resetColumn" :cell-style="cellStyle" @row-save="rowSave" @row-update="addUpdate">
           <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"
+<!--            <el-button type="primary" icon="el-icon-plus" size="small" :disabled="form.status > 0"-->
+<!--              @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 == 3"
               @click.stop="addRow">导入
             </el-button> -->
             <el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印</el-button>
           </template>
-          <template slot="headerSerial">
-            <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
-              :disabled="detailData.status == 1" circle></el-button>
-          </template>
+<!--          <template slot="headerSerial">-->
+<!--            <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"-->
+<!--              :disabled="detailData.status == 3" circle></el-button>-->
+<!--          </template>-->
           <template slot="storageIdHeader" slot-scope="{column}">
             <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
           </template>
@@ -104,33 +104,31 @@
           </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>
+              <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)" :disabled="form.status > 0">{{ row.$cellEdit ? "保存" : "编辑" }}</el-button>
+              <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)" :disabled="form.status > 0">删除</el-button>
               <!-- <el-button size="small" icon="el-icon-printer" type="text" @click="rowPrint(row, index)" :disabled="!row.id">
                 打印</el-button> -->
               <div style="display:flex;flex-direction: column;justify-content: center;margin-left: 10px;">
                 <el-tooltip effect="dark" content="向上移动" placement="top">
-                  <i v-if="index != 0&&detailData.status != 1" :disabled="detailData.status == 1"
+                  <i v-if="index != 0&&detailData.status != 3" :disabled="detailData.status == 3"
                     class="el-icon-arrow-up" @click="moveUp(row, index)" style="color:#409EFF;"></i>
                 </el-tooltip>
                 <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i
-                    v-if="index != (itemsVOList.length - 1)&&detailData.status != 1" :disabled="detailData.status == 1"
+                    v-if="index != (itemsVOList.length - 1)&&detailData.status != 3" :disabled="detailData.status == 3"
                     class="el-icon-arrow-down" @click="moveDown(row, index)" style="color:#409EFF;"></i></el-tooltip>
               </div>
             </div>
           </template>
         </avue-crud>
       </trade-card>
-      <fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="detailData.status == 1"
+      <fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="!(form.status == 2 || form.status == 0)"
         feeUrl="/blade-purchase-sales/entranceOrder/removeOrderFees" :optionType="'CMY'" :itemType="'D'"
         :inCropId="true" @beforeFinance="beforeFinance" :delType="2" :billingShow="false" />
-      <!-- <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 1" :orderFilesList="orderFilesList"
+      <!-- <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 3" :orderFilesList="orderFilesList"
         delUrl="" /> -->
       <containerTitle title="上传附件"></containerTitle>
       <c-upload typeUpload="CD" deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId"
-        :data="orderFilesList" display :enumerationValue="85.6" :disabled="detailData.status == 1"></c-upload>
+        :data="orderFilesList" display :enumerationValue="85.6" :disabled="!(form.status == 2 || form.status == 0)"></c-upload>
 
       <el-dialog append-to-body title="审核进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
         :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
@@ -290,8 +288,21 @@ export default {
     uploadFile,
     check
   },
+  watch:{
+    form:{
+      handler(){
+        if (this.form.status > 0) {
+          this.$set(this.option,'disabled',true)
+          this.$set(this.findObject(this.tableOption.column, "remarks"),'disabled',true)
+        }else {
+          this.$set(this.option,'disabled',false)
+        }
+      }
+    }
+  },
   async created() {
-    if (this.detailData.status == 1) {
+    console.log(this.detailData.status)
+    if (this.detailData.status == 3) {
       this.option.disabled = true;
     }
     if (this.detailData.id) {
@@ -463,12 +474,11 @@ export default {
             delete e.id
           })
           this.form = res.data.data;
-          this.itemsVOList = res.data.data.itemsVOList.filter(item => item.isIssue == 1);
+          this.itemsVOList = res.data.data.itemsVOList.filter(item => item.isIssue == 3);
           this.oldform = this.deepClone(res.data.data);
-          this.olditemsVOList = this.deepClone(res.data.data.itemsVOList.filter(item => item.isIssue == 1));
+          this.olditemsVOList = this.deepClone(res.data.data.itemsVOList.filter(item => item.isIssue == 3));
           this.getStorage()
-        })
-        .finally(() => {
+        }).finally(() => {
           this.pageLoading = false;
         });
     },
@@ -563,6 +573,7 @@ export default {
                 const data = {
                   id: this.form.id,
                   checkType: 'CK',
+                  status:this.form.status,
                   url: '/salesManagement/outStock/index',
                   pageStatus: "this.$store.getters.entranceXsStatus",
                   pageLabel: "出库管理",
@@ -589,6 +600,7 @@ export default {
                 const data = {
                   id: this.form.id,
                   checkType: 'CK',
+                  status:this.form.status,
                   url: '/salesManagement/outStock/index',
                   pageStatus: "this.$store.getters.entranceXsStatus",
                   pageLabel: "出库管理",
@@ -620,6 +632,7 @@ export default {
               const data = {
                 id: this.form.id,
                 checkType: 'CK',
+                status:this.form.status,
                 url: '/salesManagement/outStock/index',
                 pageStatus: "this.$store.getters.entranceXsStatus",
                 pageLabel: "出库管理",
@@ -646,6 +659,7 @@ export default {
               const data = {
                 id: this.form.id,
                 checkType: 'CK',
+                status:this.form.status,
                 url: '/salesManagement/outStock/index',
                 pageStatus: "this.$store.getters.entranceXsStatus",
                 pageLabel: "出库管理",
@@ -788,8 +802,6 @@ export default {
         }, 1000);
       }
     }
-  },
-  watch: {
   }
 };
 </script>

+ 1 - 1
src/views/salesManagement/outStock/index.vue

@@ -82,7 +82,7 @@ export default {
                 this.$store.commit("IN_CKGL_STATUS");
             }
             if (this.$route.query.check && this.show) {
-                this.editOpen({ id: this.$route.query.check.srcBillId }, 1)
+                this.editOpen({ id: this.$route.query.check.srcBillId }, 3)
                 this.show = false;
             }
         }, 100);