qukaidi 2 vuotta sitten
vanhempi
commit
f0d019f37d

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

@@ -64,7 +64,7 @@ export function getStorage(data) {
     return request({
         url: '/api/blade-client/storagedesc/storageType/list',
         method: 'get',
-        params:data
+        params: data
     })
 }
 export function getAllgoods() {
@@ -79,4 +79,11 @@ export function financingExcess(data) {
         method: 'post',
         data: data
     })
+}
+export function delItem(data) {
+    return request({
+        url: '/api/trade-purchase/woodHarvestingCloud/removeByItemId ',
+        method: 'post',
+        params: data
+    })
 }

+ 1 - 1
src/views/InventoryManagement/inventory/detailsPage.vue

@@ -11,7 +11,7 @@
           class="el-button--small-yh " @click.stop="openEdit">编辑
         </el-button>
         <el-button type="primary" @click="editCustomer" :loading="subLoading" v-if="detailData.status != 1"
-          size="small">{{ form.id ? '修改数据' : '保存数据' }}
+          size="small">保存数据
         </el-button>
         <el-dropdown style="padding: 0 6px;line-height: 0">
           <el-button type="primary" size="small" :loading="buttonLoading" :disabled="!form.id">

+ 10 - 7
src/views/InventoryManagement/inventory/index.vue

@@ -31,14 +31,17 @@
         </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"
+                <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="purchaserIdSearch">
-                    <crop-select v-model="search2.purchaserId" corpType="KH" :refresh="false"></crop-select>
-                </template>
+                        <crop-select v-model="search2.purchaserId" corpType="KH" :refresh="false"></crop-select>
+                    </template>
+                    <template slot="corpIdSearch">
+                        <crop-select v-model="search2.corpId" corpType="GYS" :refresh="false"></crop-select>
+                    </template>
                     <template slot-scope="{ row,index}" slot="purchaserId">
                         <span>{{ row.purchaser }}
                         </span>
@@ -72,7 +75,7 @@ export default {
             search: {},
             search2: {},
             form: {},
-            form2:{},
+            form2: {},
             option: {},
             dataList: [],
             itemData: [],

+ 2 - 1
src/views/basicData/agreement/detailsPage.vue

@@ -265,6 +265,7 @@ export default {
       }
     },
     getDetail(id) {
+      this.loadingBtn=true
       getDetail(id)
         .then(res => {
           if (res.data.data.warehouseId) {
@@ -277,7 +278,7 @@ export default {
         .finally(() => {
           // this.loading = false;
           // this.showBut = true;
-          // this.pageLoading = false;
+          this.loadingBtn = false;
         });
     },
     getCorpData(row) {

+ 4 - 12
src/views/basicData/agreement/js/optionList.js

@@ -1,3 +1,5 @@
+import { number } from "echarts"
+
 export const option = {
   searchShow: true,
   searchMenuSpan: 16,
@@ -53,18 +55,7 @@ export const option = {
       //   value: "dictKey"
       // },
       dicData: []
-    },
-    {
-      label: "状态",
-      prop: "billStatus",
-      overHidden: true,
-      type: "select",
-      props: {
-        label: "dictValue",
-        value: "dictKey"
-      },
-      dicData: []
-    },
+    }
   ]
 }
 export const optionList = {
@@ -93,6 +84,7 @@ export const optionList = {
         value: "dictKey"
       },
       dicData: [],
+      dataType:'number',
       cell: true,
       width: 120,
     },

+ 1 - 1
src/views/financing/financingManagement/index.vue

@@ -10,7 +10,7 @@
           </el-button>
         </template>
         <template slot-scope="{ row,index}" slot="sysNo">
-          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.sysNo }}</span>
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.sysNo }}</span>
         </template>
         <template slot-scope="{ row,index}" slot="corpId">
           <span>{{ row.corpName }}</span>

+ 0 - 16
src/views/purchasingManagement/inStock/config/customerContact.json

@@ -103,14 +103,6 @@
       "width": 100
     },
     {
-      "index": 7,
-      "prop": "width",
-      "label": "宽度(mm)",
-      "overHidden": true,
-      "cell": true,
-      "width": 100
-    },
-    {
       "index": 8,
       "prop": "thickness",
       "label": "厚度(mm)",
@@ -119,14 +111,6 @@
       "width": 100
     },
     {
-      "index": 9,
-      "prop": "widthItem",
-      "label": "宽度明细(mm)",
-      "overHidden": true,
-      "cell": true,
-      "width": 100
-    },
-    {
       "index": 10,
       "prop": "billNo",
       "label": "捆包号",

+ 1 - 1
src/views/purchasingManagement/inStock/config/mainList.json

@@ -133,7 +133,7 @@
       "overHidden": true
     },
     {
-      "label": "审状态",
+      "label": "审状态",
       "prop": "status",
       "index": 13,
       "width": 120,

+ 89 - 44
src/views/purchasingManagement/inStock/detailsPage.vue

@@ -14,18 +14,18 @@
           size="small">保存数据
         </el-button>
         <el-dropdown style="padding: 0 6px;line-height: 0">
-          <el-button type="primary" size="small" :loading="buttonLoading" :disabled="!form.id">
-            审处理<i class="el-icon-arrow-down el-icon--right"></i>
+          <el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">
+            审处理<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 :disabled="form.status<1" @click.native="checkScheduleDialog = true">审进度
+            <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">审数据</el-dropdown-item>
+            <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审进度
             </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
       </div>
     </div>
-    <div class="customer-main">
+    <div class="customer-main" v-loading="subLoading">
       <trade-card title="基础信息">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="purchaserId">
@@ -51,7 +51,7 @@
             <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="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="excelBox = true">导入
             </el-button>
@@ -98,11 +98,7 @@
         </check-schedule>
       </el-dialog>
     </div>
-    <el-dialog title="导入"
-               append-to-body
-               :close-on-click-modal="false"
-               :visible.sync="excelBox"
-               width="555px">
+    <el-dialog title="导入" append-to-body :close-on-click-modal="false" :visible.sync="excelBox" width="555px">
       <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
         <template slot="excelTemplate">
           <el-button type="primary" @click="getTemplate">
@@ -118,7 +114,7 @@
 </template>
 
 <script>
-import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods } from "@/api/purchasingManagement/inStock";
+import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, delItem } from "@/api/purchasingManagement/inStock";
 import tableOption from "./config/customerContact.json";
 import feeInfo from "@/components/fee-info/main";
 import checkSchedule from "../../../components/check/checkSchedule";
@@ -129,8 +125,10 @@ export default {
   name: "detailsPageEdit",
   data() {
     return {
+      subLoading:false,
+      buttonLoading:false,
       form: {},
-      excelBox:false,
+      excelBox: false,
       excelOption: {
         submitBtn: false,
         emptyBtn: false,
@@ -140,7 +138,7 @@ export default {
             prop: 'excelTemplate',
             formslot: true,
             span: 24,
-          },{
+          }, {
             label: '模板上传',
             prop: 'excelFile',
             type: 'upload',
@@ -155,7 +153,7 @@ export default {
           }
         ]
       },
-      excelForm:{},
+      excelForm: {},
       checkScheduleDialog: false,
       tableOption: {},
       option: {
@@ -236,7 +234,7 @@ export default {
             span: 6
           },
           {
-            label: "审状态",
+            label: "审状态",
             prop: "status",
             type: "select",
             dataType: 'number',
@@ -260,7 +258,6 @@ export default {
       itemsVOList: [],
       orderFeesList: [],
       orderFilesList: [],
-      subLoading: false,
       pageLoading: false,
       batchNo: '',
       storagetreeList: [],
@@ -377,11 +374,21 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        this.$message({
-          type: "success",
-          message: "删除成功!"
-        });
-        this.itemsVOList.splice(row.$index, 1);
+        if (row.id) {
+          delItem({ itemId: row.id }).then(res => {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.itemsVOList.splice(row.$index, 1);
+          });
+        } else {
+          this.$message({
+            type: "success",
+            message: "删除成功!"
+          });
+          this.itemsVOList.splice(row.$index, 1);
+        }
       });
     },
     getDetail(id) {
@@ -417,6 +424,7 @@ export default {
           }
           let orderFeesList = this.$refs.feeInfo.submitData();
           this.subLoading = true;
+          this.buttonLoading=false;
           let data = {
             ...this.form,
             billType: 'RK',
@@ -443,6 +451,7 @@ export default {
           })
             .finally(() => {
               this.subLoading = false;
+              this.buttonLoading = false;
             });
         } else {
           return false;
@@ -451,30 +460,66 @@ export default {
     },
     //请核
     auditCheck() {
-      this.$confirm("确定审核此订单?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        this.buttonLoading = true
-        const data = {
-          id: this.form.id,
-          checkType: 'RK',
-          url: '/purchasingManagement/inStock/index',
-          pageStatus: "this.$store.getters.entranceXsStatus",
-          pageLabel: "入库管理",
-          checkFlag: 1,
-        }
-        checkWarehousing(data).then(res => {
-          if (res.data.success) {
-            this.$message.success("操作成功!")
-            this.viewDisabled = true
-            this.approverDisabled = true
+      let orderFeesList = this.$refs.feeInfo.submitData();
+      if (orderFeesList.length == 0) {
+        this.$confirm("没有应付费用,是否继续提交?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.$confirm("确定审批此订单?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            this.buttonLoading = true
+            const data = {
+              id: this.form.id,
+              checkType: 'RK',
+              url: '/purchasingManagement/inStock/index',
+              pageStatus: "this.$store.getters.entranceXsStatus",
+              pageLabel: "入库管理",
+              checkFlag: 1,
+            }
+            checkWarehousing(data).then(res => {
+              if (res.data.success) {
+                this.$message.success("操作成功!")
+                this.viewDisabled = true
+                this.approverDisabled = true
+              }
+            })
+          }).finally(() => {
+            this.buttonLoading = false
+          })
+        })
+      } else {
+        this.$confirm("确定审批此订单?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.buttonLoading = true
+          const data = {
+            id: this.form.id,
+            checkType: 'RK',
+            url: '/purchasingManagement/inStock/index',
+            pageStatus: "this.$store.getters.entranceXsStatus",
+            pageLabel: "入库管理",
+            checkFlag: 1,
           }
+          checkWarehousing(data).then(res => {
+            if (res.data.success) {
+              this.$message.success("操作成功!")
+              this.viewDisabled = true
+              this.approverDisabled = true
+            }
+          })
+        }).finally(() => {
+          this.buttonLoading = false
         })
-      }).finally(() => {
-        this.buttonLoading = false
-      })
+      }
+
+
     },
     calculateChange(row) {
       row.storageAmount = (row.storageInQuantity ? row.storageInQuantity : 0) * (row.price ? row.price : 0)

+ 0 - 14
src/views/salesManagement/outStock/config/customerContact.json

@@ -223,20 +223,6 @@
       "width": 100
     },
     {
-      "index": 17,
-      "prop": "oneCode",
-      "label": "一维码",
-      "overHidden": true,
-      "width": 100
-    },
-    {
-      "index": 18,
-      "prop": "qrCode",
-      "label": "二维码",
-      "overHidden": true,
-      "width": 100
-    },
-    {
       "index": 24,
       "prop": "remarks",
       "label": "备注",

+ 1 - 1
src/views/salesManagement/outStock/config/mainList.json

@@ -134,7 +134,7 @@
       "overHidden": true
     },
     {
-      "label": "审状态",
+      "label": "审状态",
       "prop": "status",
       "index": 13,
       "width": 120,

+ 124 - 54
src/views/salesManagement/outStock/detailsPage.vue

@@ -14,18 +14,18 @@
           size="small">保存数据
         </el-button>
         <el-dropdown style="padding: 0 6px;line-height: 0">
-          <el-button type="primary" size="small" :loading="buttonLoading" :disabled="!form.id">
-            审处理<i class="el-icon-arrow-down el-icon--right"></i>
+          <el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">
+            审处理<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 :disabled="form.status<1" @click.native="checkScheduleDialog = true">审进度
+            <el-dropdown-item :disabled="form.status>0" @click.native="auditCheck">审数据</el-dropdown-item>
+            <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审进度
             </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
       </div>
     </div>
-    <div class="customer-main">
+    <div class="customer-main" v-loading="subLoading">
       <trade-card title="基础信息">
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="purchaserId">
@@ -112,6 +112,7 @@ import checkSchedule from "../../../components/check/checkSchedule";
 import uploadFile from "@/components/upload-file/main";
 import { getToken } from "@/util/auth";
 import { contrastObj, contrastList } from "@/util/contrastData";
+import { getCurrentDate } from "@/util/date";
 export default {
   name: "detailsPageEdit",
   data() {
@@ -197,7 +198,7 @@ export default {
             span: 6
           },
           {
-            label: "审状态",
+            label: "审状态",
             prop: "status",
             type: "select",
             dataType: 'number',
@@ -382,6 +383,7 @@ export default {
           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
           })
@@ -400,6 +402,11 @@ export default {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
+          for (let i = 0; i < this.itemsVOList.length; i++) {
+            if (this.itemsVOList[i].$cellEdit) {
+              return this.$message.error('请保存明细')
+            }
+          }
           let orderFeesList = this.$refs.feeInfo.submitData();
           this.subLoading = true;
           let data = {
@@ -436,59 +443,122 @@ export default {
     },
     //请核
     auditCheck() {
-      financingExcess({ id: this.form.purchaserId }).then(res => {
-        if (res.data.data == '操作成功') {
-          this.$confirm("确定审核此订单?", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(() => {
-            this.buttonLoading = true
-            const data = {
-              id: this.form.id,
-              checkType: 'CK',
-              url: '/salesManagement/outStock/index',
-              pageStatus: "this.$store.getters.entranceXsStatus",
-              pageLabel: "出库管理",
-              checkFlag: 2,
+      let orderFeesList = this.$refs.feeInfo.submitData();
+      if (orderFeesList.length == 0) {
+        this.$confirm("没有应收费用,是否继续提交?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          financingExcess({ id: this.form.purchaserId }).then(res => {
+            if (res.data.data == '操作成功') {
+              this.$confirm("确定审批此订单?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+              }).then(() => {
+                this.buttonLoading = true
+                const data = {
+                  id: this.form.id,
+                  checkType: 'CK',
+                  url: '/salesManagement/outStock/index',
+                  pageStatus: "this.$store.getters.entranceXsStatus",
+                  pageLabel: "出库管理",
+                  checkFlag: 2,
+                }
+                checkWarehousing(data).then(res => {
+                  if (res.data.success) {
+                    this.$message.success("操作成功!")
+                    this.viewDisabled = true
+                    this.approverDisabled = true
+                  }
+                })
+              }).finally(() => {
+                this.buttonLoading = false
+              })
+            } else {
+              this.$confirm("此订单余额不足,是否继续确认提交审批?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+              }).then(() => {
+                this.buttonLoading = true
+                const data = {
+                  id: this.form.id,
+                  checkType: 'CK',
+                  url: '/salesManagement/outStock/index',
+                  pageStatus: "this.$store.getters.entranceXsStatus",
+                  pageLabel: "出库管理",
+                  checkFlag: 2,
+                }
+                checkWarehousing(data).then(res => {
+                  if (res.data.success) {
+                    this.$message.success("操作成功!")
+                    this.viewDisabled = true
+                    this.approverDisabled = true
+                  }
+                })
+              }).finally(() => {
+                this.buttonLoading = false
+              })
             }
-            checkWarehousing(data).then(res => {
-              if (res.data.success) {
-                this.$message.success("操作成功!")
-                this.viewDisabled = true
-                this.approverDisabled = true
+          })
+        })
+      } else {
+        financingExcess({ id: this.form.purchaserId }).then(res => {
+          if (res.data.data == '操作成功') {
+            this.$confirm("确定审批此订单?", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              this.buttonLoading = true
+              const data = {
+                id: this.form.id,
+                checkType: 'CK',
+                url: '/salesManagement/outStock/index',
+                pageStatus: "this.$store.getters.entranceXsStatus",
+                pageLabel: "出库管理",
+                checkFlag: 2,
               }
+              checkWarehousing(data).then(res => {
+                if (res.data.success) {
+                  this.$message.success("操作成功!")
+                  this.viewDisabled = true
+                  this.approverDisabled = true
+                }
+              })
+            }).finally(() => {
+              this.buttonLoading = false
             })
-          }).finally(() => {
-            this.buttonLoading = false
-          })
-        } else {
-          this.$confirm("此订单余额不足,是否继续确认提交审核?", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(() => {
-            this.buttonLoading = true
-            const data = {
-              id: this.form.id,
-              checkType: 'CK',
-              url: '/salesManagement/outStock/index',
-              pageStatus: "this.$store.getters.entranceXsStatus",
-              pageLabel: "出库管理",
-              checkFlag: 2,
-            }
-            checkWarehousing(data).then(res => {
-              if (res.data.success) {
-                this.$message.success("操作成功!")
-                this.viewDisabled = true
-                this.approverDisabled = true
+          } else {
+            this.$confirm("此订单余额不足,是否继续确认提交审批?", {
+              confirmButtonText: "确定",
+              cancelButtonText: "取消",
+              type: "warning"
+            }).then(() => {
+              this.buttonLoading = true
+              const data = {
+                id: this.form.id,
+                checkType: 'CK',
+                url: '/salesManagement/outStock/index',
+                pageStatus: "this.$store.getters.entranceXsStatus",
+                pageLabel: "出库管理",
+                checkFlag: 2,
               }
+              checkWarehousing(data).then(res => {
+                if (res.data.success) {
+                  this.$message.success("操作成功!")
+                  this.viewDisabled = true
+                  this.approverDisabled = true
+                }
+              })
+            }).finally(() => {
+              this.buttonLoading = false
             })
-          }).finally(() => {
-            this.buttonLoading = false
-          })
-        }
-      })
+          }
+        })
+      }
     },
     getTemplate() {
       window.open(`/api/trade-purchase/woodHarvestingCloud/export-template?${this.website.tokenHeader}=${getToken()}`)