Browse Source

Merge branch 'dev' of http://git.echepei.com/tubao/Smart_platform_ui into dev

Qukatie 2 years ago
parent
commit
69d1024f00

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

@@ -121,7 +121,7 @@ export default {
             label: "盘点日期",
             prop: "stockTime",
             type: "datetime",
-            format: "yyyy-MM-dd HH:mm:ss",
+            format: "yyyy-MM-dd HH:mm",
             valueFormat: "yyyy-MM-dd HH:mm:ss",
             rules: [
               {

+ 10 - 1
src/views/bidingDocument/issueTender/detailsPageEdit.vue

@@ -150,6 +150,7 @@ import {
 } from "@/api/bidingDocument/issueTender";
 import check from "@/components/check/check";
 import checkSchedule from "@/components/check/checkSchedule";
+import {dateFormat} from "@/util/date";
 export default {
   name: "detailsPageEdit",
   components:{
@@ -205,7 +206,7 @@ export default {
           type: "datetime",
           format: 'yyyy-MM-dd HH:mm',
           valueFormat: 'yyyy-MM-dd HH:mm:ss',
-          value:new Date,
+          value:dateFormat(new Date, 'yyyy-MM-dd hh:mm:ss'),
           rules: [{
             required: true,
             message: " ",
@@ -313,6 +314,7 @@ export default {
             label: '否',
             value: 0
           }],
+          value:1,
           rules: [{
             required: true,
             message: " ",
@@ -337,6 +339,7 @@ export default {
             label: "dictValue",
             value: "dictValue"
           },
+          value:"海运",
           rules: [{
             required: true,
             message: " ",
@@ -345,6 +348,7 @@ export default {
         }, {
           label: '运输条款',
           prop: 'transportClause',
+          value: "CY-CY",
           rules: [{
             required: true,
             message: " ",
@@ -353,6 +357,7 @@ export default {
         }, {
           label: '件数',
           prop: 'number',
+          value:10,
           rules: [{
             required: true,
             message: " ",
@@ -367,6 +372,7 @@ export default {
             label: "dictValue",
             value: "dictValue"
           },
+          value:"木箱",
           rules: [{
             required: true,
             message: " ",
@@ -375,6 +381,7 @@ export default {
         }, {
           label: '重量(kgs)',
           prop: 'weight',
+          value:27000,
           rules: [{
             required: true,
             message: " ",
@@ -383,6 +390,7 @@ export default {
         }, {
           label: '尺码(cmb)',
           prop: 'size',
+          value:18,
           rules: [{
             required: true,
             message: " ",
@@ -392,6 +400,7 @@ export default {
           label: '货物信息',
           prop: 'cargoInformation',
           span: 18,
+          value: "GLASS",
           rules: [{
             required: true,
             message: " ",

+ 2 - 2
src/views/businessManagement/purchaseOrder/configuration/mainList.json

@@ -165,7 +165,7 @@
     {
       "label": "来源单号",
       "prop": "orgOrderNo",
-      "search": false,
+      "search": true,
       "index": 14,
       "width": 100,
       "overHidden": true
@@ -307,4 +307,4 @@
       "overHidden": true
     }
   ]
-}
+}

+ 21 - 20
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -2593,13 +2593,6 @@ export default {
           }
           this.priceChange(this.goodsListSave[item])
         })
-        getPurchasePrice({code: this.goodsListSave[item].code}).then(res => {
-          if (res.data.data.length > 0) {
-            this.$set(this.goodsListSave[item], 'purchaseAmount', res.data.data[0].purchasePrice)
-          } else {
-            this.$set(this.goodsListSave[item], 'purchaseAmount', '0')
-          }
-        })
         selectGoodsNum({
           goodsId: this.goodsListSave[item].id,
           itemType: this.goodsListSave[item].typeno,
@@ -2640,10 +2633,18 @@ export default {
           delete this.goodsListSave[item].updateUser
           delete this.goodsListSave[item].updateUserName
           this.maxGoodsNum++
-          this.quantityChange(this.goodsListSave[item])
-          this.$refs.crudContact.rowCellAdd(this.goodsListSave[item]);
-          this.$nextTick(() => {
+
+          getPurchasePrice({code: this.goodsListSave[item].code}).then(res => {
+            if (res.data.data.length > 0) {
+              this.$set(this.goodsListSave[item], 'purchaseAmount', res.data.data[0].purchasePrice)
+            } else {
+              this.$set(this.goodsListSave[item], 'purchaseAmount', '0')
+            }
             this.quantityChange(this.goodsListSave[item])
+            this.$refs.crudContact.rowCellAdd(this.goodsListSave[item]);
+            this.$nextTick(() => {
+              this.quantityChange(this.goodsListSave[item])
+            })
           })
           // this.$refs.crudContact.rowCell(this.goodsListSave[item], this.goodsListSave.length - 1)
         })
@@ -2662,13 +2663,6 @@ export default {
           }
           this.priceChange(this.tableData[item])
         })
-        getPurchasePrice({code: this.tableData[item].code}).then(res => {
-          if (res.data.data.length > 0) {
-            this.$set(this.tableData[item], 'purchaseAmount', res.data.data[0].purchasePrice)
-          } else {
-            this.$set(this.tableData[item], 'purchaseAmount', '0')
-          }
-        })
         selectGoodsNum({
           goodsId: this.tableData[item].id,
           itemType: this.tableData[item].typeno,
@@ -2707,10 +2701,17 @@ export default {
           delete this.tableData[item].updateUser
           delete this.tableData[item].updateUserName
           this.maxGoodsNum++
-          this.quantityChange(this.tableData[item])
-          this.$refs.crudContact.rowCellAdd(this.tableData[item]);
-          this.$nextTick(() => {
+          getPurchasePrice({code: this.tableData[item].code}).then(rest => {
+            if (rest.data.data.length > 0) {
+              this.$set(this.tableData[item], 'purchaseAmount', rest.data.data[0].purchasePrice)
+            } else {
+              this.$set(this.tableData[item], 'purchaseAmount', '0')
+            }
             this.quantityChange(this.tableData[item])
+            this.$refs.crudContact.rowCellAdd(this.tableData[item]);
+            this.$nextTick(() => {
+              this.quantityChange(this.tableData[item])
+            })
           })
           // this.$refs.crudContact.rowCell(this.tableData[item], this.tableData.length - 1)
         })

+ 1 - 1
src/views/financialManagement/billDetails/configuration/mainList.json

@@ -21,7 +21,7 @@
   "searchIcon": true,
   "searchIndex": 2,
   "addBtn":false,
-  "menu": true,
+  "menu": false,
   "headerAlign": "center",
   "showSummary": true,
   "summaryText": "合计",

+ 5 - 1
src/views/financing/financingLedger/js/optionList2.js

@@ -46,6 +46,10 @@ export const option ={
       label: "融资金额",
       prop: "financingAmount",
     },
+    {
+      label: "通过公司",
+      prop: "company",
+    }
   ]
 }
 export const optionList ={
@@ -173,4 +177,4 @@ export const optionList ={
       index: 10
     }
   ]
-}
+}

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

@@ -95,7 +95,7 @@ export default {
             label: "通过公司",
             prop: "companyId",
             rules: [{
-                required: true,
+                required: false,
                 message: "",
                 trigger: "blur"
             }],

+ 5 - 1
src/views/financing/financingManagement/js/optionList.js

@@ -49,6 +49,10 @@ export const option ={
       prop: "financingAmount",
     },
     {
+      label: "通过公司",
+      prop: "company",
+    },
+    {
       label: "状态",
       prop: "status",
       type: "select",
@@ -125,4 +129,4 @@ export const optionList ={
       width: 120,
     },
   ]
-}
+}

+ 9 - 1
src/views/maintenance/salesPolicy/configuration/mainList.json

@@ -63,7 +63,7 @@
     },
     {
       "label": "状态",
-      "prop": "status",
+      "prop": "auditStatus",
       "type": "select",
       "dicData": [
         {
@@ -73,6 +73,14 @@
         {
           "label": "停用",
           "value": 1
+        },
+        {
+          "label": "暂存",
+          "value": 2
+        },
+        {
+          "label": "审批中",
+          "value": 3
         }
       ],
       "search": true,

+ 73 - 26
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -12,6 +12,7 @@
         </el-button>
       </div>
       <el-button
+        style="margin-right: 110px"
         class="add-customer-btn"
         type="primary"
         :disabled="disabled"
@@ -19,19 +20,17 @@
         @click="editCustomer"
         >{{ form.id ? "确认修改" : "确认新增" }}
       </el-button>
-
-<!--      style="margin-right: 110px"-->
-<!--      <el-dropdown class="add-customer-btn">-->
-<!--        <el-button type="primary" size="small">-->
-<!--          审核处理<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>-->
-<!--        </el-button>-->
-<!--        <el-dropdown-menu slot="dropdown">-->
-<!--          <el-dropdown-item @click.native="pleaseCheck">请核数据</el-dropdown-item>-->
-<!--          <el-dropdown-item>审核进度</el-dropdown-item>-->
+      <el-dropdown class="add-customer-btn">
+        <el-button type="primary" size="small">
+          审核处理<i class="el-icon-arrow-down el-icon--right"></i>
+        </el-button>
+        <el-dropdown-menu slot="dropdown">
+          <el-dropdown-item @click.native="pleaseCheck" :disabled="form.auditStatus != 2">请核数据</el-dropdown-item>
+          <el-dropdown-item @click.native="checkScheduleDialog = true,checkId=form.id" :disabled="form.auditStatus === 1 || form.auditStatus === 2">审核进度</el-dropdown-item>
 <!--          <el-dropdown-item>撤销请核</el-dropdown-item>-->
 <!--          <el-dropdown-item>审批数据</el-dropdown-item>-->
-<!--        </el-dropdown-menu>-->
-<!--      </el-dropdown>-->
+        </el-dropdown-menu>
+      </el-dropdown>
     </div>
     <div style="margin-top: 60px">
       <el-form
@@ -317,6 +316,24 @@
         </span>
       </el-dialog>
     </div>
+    <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
+    >
+      <check-schedule
+          :checkId="checkId"
+          :batchNo="batchNo"
+          @choceScheduleFun="choceScheduleFun"
+      >
+      </check-schedule>
+    </el-dialog>
   </div>
 </template>
 
@@ -347,10 +364,14 @@ import { contrastObj, contrastList } from "@/util/contrastData";
 import { getToken } from "@/util/auth";
 import { getPurchasePrice } from "@/api/basicData/fees"
 
+import checkSchedule from "@/components/check/checkSchedule";
 export default {
   props: {
     detailData: Object
   },
+  components:{
+    checkSchedule,
+  },
   data() {
     return {
       configuration: {
@@ -360,6 +381,9 @@ export default {
         placeholder: "请点击右边按钮选择",
         dicData: []
       },
+      checkId:'',
+      batchNo:'',
+      checkScheduleDialog:false,
       form: {},
       disabled: false,
       customerContact: customerContact,
@@ -559,12 +583,17 @@ export default {
       };
       this.contactsData = [];
     }
+    if (this.detailData.check) {
+      this.batchNo = this.detailData.check.batchNo
+    }
   },
   methods: {
+    choceScheduleFun(){
+      this.checkScheduleDialog = false
+    },
     queryData(id) {
       this.openFullScreen(false, "正在努力的加载...");
-      detail(id)
-          .then(res => {
+      detail(id).then(res => {
             this.form = res.data.data;
             if (this.form.corpNameList) {
               this.configuration.dicData = this.form.corpNameList;
@@ -579,10 +608,8 @@ export default {
             delete this.form.specialItemList;
             delete this.form.presentItemList;
             this.getItemdetail();
-          })
-          .finally(() => {
             this.openFullScreen(true);
-          });
+          })
     },
     getItemdetail() {
       this.contactLoading = true;
@@ -866,17 +893,37 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        const data = {
-          id : this.form.id,
-          checkType: 'xszc',
-          url: '/maintenance/salesPolicy/index',
-          pageStatus:"this.$store.getters.domSaleStatus",
-          pageLabel:"销售政策",
-          checkFlag: 2,
+        for (let item in this.contactsData) {
+          if (!this.contactsData[item].corpId) {
+            return this.$message.error('特价明细第' + (Number(item) + 1) + '行供应商不能为空')
+          }
         }
-        pleaseCheck(data).then(res=>{
-          console.log(res)
-        })
+        for (let item in this.contactsDataBuyFree) {
+          if (!this.contactsDataBuyFree[item].corpId) {
+            return this.$message.error('买赠明细第' + (Number(item) + 1) + '行供应商不能为空')
+          }
+        }
+        this.form.corps = this.form.corps.join(",");
+        this.form.specialItemList = this.contactsData;
+        this.form.presentItemList = this.contactsDataBuyFree;
+        this.openFullScreen(false, "正在努力的加载...");
+        typeSave(this.form).then(res => {
+          const data = {
+            id : this.form.id,
+            checkType: 'xszc',
+            url: '/maintenance/salesPolicy/index',
+            pageStatus:"this.$store.getters.domSaleStatus",
+            pageLabel:"销售政策",
+            checkFlag: 2,
+          }
+          pleaseCheck(data).then(res=>{
+            this.$message({
+              type: "success",
+              message: "请核成功!"
+            });
+            this.queryData(this.form.id);
+          })
+        });
       })
     },
     //修改提交触发

+ 318 - 63
src/views/purchasingManagement/inStock/detailsPage.vue

@@ -79,6 +79,12 @@
             <el-button type="info" icon="el-icon-top" size="small" :disabled="detailData.status == 1&&form.id"
                        @click.stop="excelBox = true">导入
             </el-button>
+<!--            <el-button-->
+<!--                type="success"-->
+<!--                icon="el-icon-printer"-->
+<!--                size="small"-->
+<!--                @click.stop="dialogVisible = true">打印-->
+<!--            </el-button>-->
           </template>
           <template slot="headerSerial">
             <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
@@ -167,6 +173,20 @@
         温馨提示 第一次导入时请先下载模板
       </p>
     </el-dialog>
+    <el-dialog
+        title="打印"
+        :visible.sync="dialogVisible"
+        fullscreen
+        append-to-body
+        width="70%">
+      <div id="printAll">
+        <div v-for="item in 1000">测试</div>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary">打 印</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -191,13 +211,13 @@ import {contrastObj, contrastList, contrastList2} from "@/util/contrastData";
 import {validatenull} from '@/util/validate'
 import check from "@/components/check/check";
 import {dateFormat} from "@/util/date";
-
 export default {
   name: "detailsPageEdit",
   data() {
     return {
       checkData: {},
       checkDialog: false,
+      dialogVisible: false,
       subLoading: false,
       form: {},
       excelBox: false,
@@ -251,7 +271,7 @@ export default {
             prop: "stockTime",
             type: "datetime",
             value: dateFormat(new Date(),'yyyy-MM-dd hh:mm:ss'),
-            format: "yyyy-MM-dd HH:mm:ss",
+            format: "yyyy-MM-dd HH:mm",
             valueFormat: "yyyy-MM-dd HH:mm:ss",
             rules: [
               {
@@ -307,7 +327,7 @@ export default {
             label: "车船号",
             prop: "vehicleShipNumber",
             rules: [{
-              required: true,
+              required: false,
               message: "",
               trigger: "blur"
             }],
@@ -583,26 +603,86 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          if (this.itemsVOList.length == 0) {
-            return this.$message({
-              type: "warning",
-              message: "无明细不允许提交!"
-            });
-          }
-          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;
-          })
+            for (let i = 0; i < this.itemsVOList.length; i++) {
+              // if (validatenull(this.itemsVOList[i].storageId)) {
+              //   return this.$message.error('请完善第' + (i + 1) + '行的库区')
+              // }
+              if (validatenull(this.itemsVOList[i].itemId)) {
+                return this.$message.error('请完善第' + (i + 1) + '行的品名')
+              }
+              // if (validatenull(this.itemsVOList[i].itemType)) {
+              //   return this.$message.error('请完善第' + (i + 1) + '行的品牌')
+              // }
+              // if (validatenull(this.itemsVOList[i].grade)) {
+              //   return this.$message.error('请完善第' + (i + 1) + '行的等级')
+              // }
+              if (validatenull(this.itemsVOList[i].billNo)) {
+                return this.$message.error('请完善第' + (i + 1) + '行的捆包号')
+              }
+              // if (validatenull(this.itemsVOList[i].sliceNumber)) {
+              //   return this.$message.error('请完善第' + (i + 1) + '行的片数')
+              // }
+              if (validatenull(this.itemsVOList[i].storageInQuantity)) {
+                return this.$message.error('请完善第' + (i + 1) + '行的入库量')
+              }
+              // if (validatenull(this.itemsVOList[i].unit)) {
+              //   return this.$message.error('请完善第' + (i + 1) + '行的入库单位')
+              // }
+              if (this.form.arrival == 1) {
+                if (validatenull(this.itemsVOList[i].price)) {
+                  return this.$message.error('请完善第' + (i + 1) + '行的入库单价')
+                }
+              }
+            }
+            this.itemsVOList.forEach((e, index) => {
+              e.sort = Number(index) + 1
+            })
+            let orderFeesList = this.$refs.feeInfo.submitData();
+            this.subLoading = true;
+            let data = {
+              ...this.form,
+              billType: 'RK',
+              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.oldform = this.deepClone(res.data.data);
+              this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
+              this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
+              this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
+              this.$message({
+                type: "success",
+                message: "保存成功!"
+              });
+              if (!this.detailData.id){
+                this.detailData.id = res.data.data.id
+              }
+              if (this.itemsVOList.length == 0) {
+                this.subLoading = false
+                return this.$message({
+                  type: "warning",
+                  message: "无明细不允许提交!"
+                });
+              }
+              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("是否确认撤销?", {
@@ -610,19 +690,79 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
+          for (let i = 0; i < this.itemsVOList.length; i++) {
+            // if (validatenull(this.itemsVOList[i].storageId)) {
+            //   return this.$message.error('请完善第' + (i + 1) + '行的库区')
+            // }
+            if (validatenull(this.itemsVOList[i].itemId)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的品名')
+            }
+            // if (validatenull(this.itemsVOList[i].itemType)) {
+            //   return this.$message.error('请完善第' + (i + 1) + '行的品牌')
+            // }
+            // if (validatenull(this.itemsVOList[i].grade)) {
+            //   return this.$message.error('请完善第' + (i + 1) + '行的等级')
+            // }
+            if (validatenull(this.itemsVOList[i].billNo)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的捆包号')
+            }
+            // if (validatenull(this.itemsVOList[i].sliceNumber)) {
+            //   return this.$message.error('请完善第' + (i + 1) + '行的片数')
+            // }
+            if (validatenull(this.itemsVOList[i].storageInQuantity)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的入库量')
+            }
+            // if (validatenull(this.itemsVOList[i].unit)) {
+            //   return this.$message.error('请完善第' + (i + 1) + '行的入库单位')
+            // }
+            if (this.form.arrival == 1) {
+              if (validatenull(this.itemsVOList[i].price)) {
+                return this.$message.error('请完善第' + (i + 1) + '行的入库单价')
+              }
+            }
+          }
+          this.itemsVOList.forEach((e, index) => {
+            e.sort = Number(index) + 1
+          })
+          let orderFeesList = this.$refs.feeInfo.submitData();
           this.subLoading = true;
-          withdraw({
-            id: this.form.id,
-            type: "RK",
-            status: 0,
-            isIssue: 0
-          }).then(res => {
+          let data = {
+            ...this.form,
+            billType: 'RK',
+            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.oldform = this.deepClone(res.data.data);
+            this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
+            this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
+            this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
             this.$message({
               type: "success",
-              message: "撤销成功!"
+              message: "保存成功!"
             });
-            this.getDetail(this.form.id);
-            this.subLoading = false;
+            if (!this.detailData.id){
+              this.detailData.id = res.data.data.id
+            }
+
+            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;
+            })
           })
         })
       }
@@ -714,7 +854,150 @@ export default {
             cancelButtonText: "取消",
             type: "warning"
           }).then(() => {
-            const data = {
+            for (let i = 0; i < this.itemsVOList.length; i++) {
+              // if (validatenull(this.itemsVOList[i].storageId)) {
+              //   return this.$message.error('请完善第' + (i + 1) + '行的库区')
+              // }
+              if (validatenull(this.itemsVOList[i].itemId)) {
+                return this.$message.error('请完善第' + (i + 1) + '行的品名')
+              }
+              // if (validatenull(this.itemsVOList[i].itemType)) {
+              //   return this.$message.error('请完善第' + (i + 1) + '行的品牌')
+              // }
+              // if (validatenull(this.itemsVOList[i].grade)) {
+              //   return this.$message.error('请完善第' + (i + 1) + '行的等级')
+              // }
+              if (validatenull(this.itemsVOList[i].billNo)) {
+                return this.$message.error('请完善第' + (i + 1) + '行的捆包号')
+              }
+              // if (validatenull(this.itemsVOList[i].sliceNumber)) {
+              //   return this.$message.error('请完善第' + (i + 1) + '行的片数')
+              // }
+              if (validatenull(this.itemsVOList[i].storageInQuantity)) {
+                return this.$message.error('请完善第' + (i + 1) + '行的入库量')
+              }
+              // if (validatenull(this.itemsVOList[i].unit)) {
+              //   return this.$message.error('请完善第' + (i + 1) + '行的入库单位')
+              // }
+              if (this.form.arrival == 1) {
+                if (validatenull(this.itemsVOList[i].price)) {
+                  return this.$message.error('请完善第' + (i + 1) + '行的入库单价')
+                }
+              }
+            }
+            this.itemsVOList.forEach((e, index) => {
+              e.sort = Number(index) + 1
+            })
+            let orderFeesList = this.$refs.feeInfo.submitData();
+            this.subLoading = true;
+            let data = {
+              ...this.form,
+              billType: 'RK',
+              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.oldform = this.deepClone(res.data.data);
+              this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
+              this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
+              this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
+              this.$message({
+                type: "success",
+                message: "保存成功!"
+              });
+              if (!this.detailData.id){
+                this.detailData.id = res.data.data.id
+              }
+              const datat = {
+                id: this.form.id,
+                checkType: 'RK',
+                url: '/purchasingManagement/inStock/index',
+                pageStatus: "this.$store.getters.entranceXsStatus",
+                pageLabel: "入库管理",
+                checkFlag: 1,
+              }
+              checkWarehousing(datat).then(res => {
+                if (res.data.success) {
+                  this.$message.success("操作成功!")
+                }
+              }).finally(() => {
+                this.subLoading = false
+                this.getDetail(this.form.id)
+              })
+            })
+          })
+        })
+      } else {
+        this.$confirm("确定审核此订单?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          for (let i = 0; i < this.itemsVOList.length; i++) {
+            // if (validatenull(this.itemsVOList[i].storageId)) {
+            //   return this.$message.error('请完善第' + (i + 1) + '行的库区')
+            // }
+            if (validatenull(this.itemsVOList[i].itemId)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的品名')
+            }
+            // if (validatenull(this.itemsVOList[i].itemType)) {
+            //   return this.$message.error('请完善第' + (i + 1) + '行的品牌')
+            // }
+            // if (validatenull(this.itemsVOList[i].grade)) {
+            //   return this.$message.error('请完善第' + (i + 1) + '行的等级')
+            // }
+            if (validatenull(this.itemsVOList[i].billNo)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的捆包号')
+            }
+            // if (validatenull(this.itemsVOList[i].sliceNumber)) {
+            //   return this.$message.error('请完善第' + (i + 1) + '行的片数')
+            // }
+            if (validatenull(this.itemsVOList[i].storageInQuantity)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的入库量')
+            }
+            // if (validatenull(this.itemsVOList[i].unit)) {
+            //   return this.$message.error('请完善第' + (i + 1) + '行的入库单位')
+            // }
+            if (this.form.arrival == 1) {
+              if (validatenull(this.itemsVOList[i].price)) {
+                return this.$message.error('请完善第' + (i + 1) + '行的入库单价')
+              }
+            }
+          }
+          this.itemsVOList.forEach((e, index) => {
+            e.sort = Number(index) + 1
+          })
+          let orderFeesList = this.$refs.feeInfo.submitData();
+          this.subLoading = true;
+          let data = {
+            ...this.form,
+            billType: 'RK',
+            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.oldform = this.deepClone(res.data.data);
+            this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
+            this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
+            this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
+            this.$message({
+              type: "success",
+              message: "保存成功!"
+            });
+            if (!this.detailData.id){
+              this.detailData.id = res.data.data.id
+            }
+            const dataT = {
               id: this.form.id,
               checkType: 'RK',
               url: '/purchasingManagement/inStock/index',
@@ -722,8 +1005,7 @@ export default {
               pageLabel: "入库管理",
               checkFlag: 1,
             }
-            this.subLoading = true
-            checkWarehousing(data).then(res => {
+            checkWarehousing(dataT).then(res => {
               if (res.data.success) {
                 this.$message.success("操作成功!")
               }
@@ -733,32 +1015,6 @@ export default {
             })
           })
         })
-      } else {
-        this.$confirm("确定审核此订单?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          this.subLoading = 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("操作成功!")
-            }
-          }).finally(() => {
-            this.subLoading = false
-            this.getDetail(this.form.id)
-          })
-        }).finally(() => {
-
-        })
       }
     },
     revokeCheck() {
@@ -795,7 +1051,6 @@ export default {
       params.valid = true
       params.parentId = this.form.id
       callback(params)
-      console.log('1111')
     },
     getTemplate() {
       window.open(`/api/trade-purchase/woodHarvestingCloud/export-template?${this.website.tokenHeader}=${getToken()}`)
@@ -806,7 +1061,7 @@ export default {
           this.itemsVOList.push({
             ...item,
             containerNo:this.form.caseNo,
-            $cellEdit: true
+            $cellEdit: false
           })
         })
         this.excelBox = false

+ 199 - 61
src/views/salesManagement/outStock/detailsPage.vue

@@ -133,6 +133,7 @@
       </trade-card>
       <fee-info ref="feeInfo" :orderFeesList="orderFeesList"
                 :disabled="!(form.status == 2 || form.status == 0 || !form.status)"
+                :corpId="form.purchaserId"
                 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 == 3" :orderFilesList="orderFilesList"
@@ -289,7 +290,7 @@ export default {
             prop: "stockTime",
             type: "datetime",
             value: dateFormat(new Date(),'yyyy-MM-dd hh:mm:ss'),
-            format: "yyyy-MM-dd HH:mm:ss",
+            format: "yyyy-MM-dd HH:mm",
             valueFormat: "yyyy-MM-dd HH:mm:ss",
             rules: [
               {
@@ -548,6 +549,14 @@ export default {
         })
         delete data[data.length - 1].id
       }
+      let dataList = this.form.billNo.split(',')
+      for (let item of this.goodsListSave){
+        dataList.push(item.mainBillNo)
+      }
+      let list = dataList.filter(function(value,index,self){
+        return self.indexOf(value) ===index;
+      });
+      this.form.billNo = list.join(',')
       this.itemsVOList = this.itemsVOList.concat(data)
       this.goodsListSave = []
       this.dialogVisible = false
@@ -701,7 +710,7 @@ export default {
             delete res.data.data.createTime
             delete res.data.data.createUser
             delete res.data.data.createUserName
-            delete res.data.data.sysNo
+            // delete res.data.data.sysNo
             delete res.data.data.status
             delete res.data.data.vehicleShipNumber
             delete res.data.data.stockUser
@@ -809,7 +818,193 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          this.subLoading = true
+          // for (let i = 0; i < this.itemsVOList.length; i++) {
+          //   if (validatenull(this.itemsVOList[i].storageId)) {
+          //     return this.$message.error('请完善第' + (i + 1) + '行的库区')
+          //   }
+          //   if (validatenull(this.itemsVOList[i].itemId)) {
+          //     return this.$message.error('请完善第' + (i + 1) + '行的品名')
+          //   }
+          //   if (validatenull(this.itemsVOList[i].itemType)) {
+          //     return this.$message.error('请完善第' + (i + 1) + '行的品牌')
+          //   }
+          //   if (validatenull(this.itemsVOList[i].grade)) {
+          //     return this.$message.error('请完善第' + (i + 1) + '行的等级')
+          //   }
+          //   if (validatenull(this.itemsVOList[i].billNo)) {
+          //     return this.$message.error('请完善第' + (i + 1) + '行的捆包号')
+          //   }
+          //   if (validatenull(this.itemsVOList[i].sliceNumber)) {
+          //     return this.$message.error('请完善第' + (i + 1) + '行的片数')
+          //   }
+          //   if (validatenull(this.itemsVOList[i].storageInQuantity)) {
+          //     return this.$message.error('请完善第' + (i + 1) + '行的入库量')
+          //   }
+          //   if (validatenull(this.itemsVOList[i].unit)) {
+          //     return this.$message.error('请完善第' + (i + 1) + '行的入库单位')
+          //   }
+          //   if (validatenull(this.itemsVOList[i].price)) {
+          //     return this.$message.error('请完善第' + (i + 1) + '行的入库单价')
+          //   }
+          // }
+          this.itemsVOList.forEach((e, index) => {
+            e.sort = Number(index) + 1
+          })
+          let orderFeesList = this.$refs.feeInfo.submitData();
+          this.subLoading = true;
+          let data = {
+            ...this.form,
+            billType: 'CK',
+            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.oldform = this.deepClone(res.data.data);
+            this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
+            this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
+            this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
+            this.$message({
+              type: "success",
+              message: "保存成功!"
+            });
+            if (!this.detailData.id) {
+              this.detailData.id = res.data.data.id
+            }
+            if (this.itemsVOList.length == 0) {
+              this.subLoading = false
+              return this.$message({
+                type: "warning",
+                message: "无明细不允许提交!"
+              });
+            }
+            financingExcess({id: this.form.purchaserId}).then(res => {
+              if (res.data.data == '操作成功') {
+                this.$confirm("确定审核此订单?", {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning"
+                }).then(() => {
+                  const dataT = {
+                    id: this.form.id,
+                    checkType: 'CK',
+                    status: this.form.status,
+                    url: '/salesManagement/outStock/index',
+                    pageStatus: "this.$store.getters.entranceXsStatus",
+                    pageLabel: "出库管理",
+                    checkFlag: 2,
+                  }
+                  checkWarehousing(dataT).then(res => {
+                    if (res.data.success) {
+                      this.$message.success("操作成功!")
+                      this.viewDisabled = true
+                      this.approverDisabled = true
+                    }
+                  }).finally(() => {
+                    this.subLoading = false
+                    this.getDetail(this.form.id)
+                  })
+                })
+              } else {
+                this.$confirm(res.data.data, {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning"
+                }).then(() => {
+                  this.subLoading = true
+                  const data = {
+                    id: this.form.id,
+                    checkType: 'CK',
+                    status: this.form.status,
+                    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.subLoading = false
+                    this.getDetail(this.form.id)
+                  })
+                })
+              }
+            })
+          })
+        })
+      } else {
+        // for (let i = 0; i < this.itemsVOList.length; i++) {
+        //   if (validatenull(this.itemsVOList[i].storageId)) {
+        //     return this.$message.error('请完善第' + (i + 1) + '行的库区')
+        //   }
+        //   if (validatenull(this.itemsVOList[i].itemId)) {
+        //     return this.$message.error('请完善第' + (i + 1) + '行的品名')
+        //   }
+        //   if (validatenull(this.itemsVOList[i].itemType)) {
+        //     return this.$message.error('请完善第' + (i + 1) + '行的品牌')
+        //   }
+        //   if (validatenull(this.itemsVOList[i].grade)) {
+        //     return this.$message.error('请完善第' + (i + 1) + '行的等级')
+        //   }
+        //   if (validatenull(this.itemsVOList[i].billNo)) {
+        //     return this.$message.error('请完善第' + (i + 1) + '行的捆包号')
+        //   }
+        //   if (validatenull(this.itemsVOList[i].sliceNumber)) {
+        //     return this.$message.error('请完善第' + (i + 1) + '行的片数')
+        //   }
+        //   if (validatenull(this.itemsVOList[i].storageInQuantity)) {
+        //     return this.$message.error('请完善第' + (i + 1) + '行的入库量')
+        //   }
+        //   if (validatenull(this.itemsVOList[i].unit)) {
+        //     return this.$message.error('请完善第' + (i + 1) + '行的入库单位')
+        //   }
+        //   if (validatenull(this.itemsVOList[i].price)) {
+        //     return this.$message.error('请完善第' + (i + 1) + '行的入库单价')
+        //   }
+        // }
+        this.itemsVOList.forEach((e, index) => {
+          e.sort = Number(index) + 1
+        })
+        let orderFeesList = this.$refs.feeInfo.submitData();
+        this.subLoading = true;
+        let data = {
+          ...this.form,
+          billType: 'CK',
+          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.oldform = this.deepClone(res.data.data);
+          this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
+          this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
+          this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
+          this.$message({
+            type: "success",
+            message: "保存成功!"
+          });
+          if (!this.detailData.id) {
+            this.detailData.id = res.data.data.id
+          }
+          if (this.itemsVOList.length == 0) {
+            this.subLoading = false
+            return this.$message({
+              type: "warning",
+              message: "无明细不允许提交!"
+            });
+          }
           financingExcess({id: this.form.purchaserId}).then(res => {
             if (res.data.data == '操作成功') {
               this.$confirm("确定审核此订单?", {
@@ -817,6 +1012,7 @@ export default {
                 cancelButtonText: "取消",
                 type: "warning"
               }).then(() => {
+                this.subLoading = true
                 const data = {
                   id: this.form.id,
                   checkType: 'CK',
@@ -867,64 +1063,6 @@ export default {
             }
           })
         })
-      } else {
-        financingExcess({id: this.form.purchaserId}).then(res => {
-          if (res.data.data == '操作成功') {
-            this.$confirm("确定审核此订单?", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              type: "warning"
-            }).then(() => {
-              this.subLoading = true
-              const data = {
-                id: this.form.id,
-                checkType: 'CK',
-                status: this.form.status,
-                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.subLoading = false
-                this.getDetail(this.form.id)
-              })
-            })
-          } else {
-            this.$confirm(res.data.data, {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              type: "warning"
-            }).then(() => {
-              this.subLoading = true
-              const data = {
-                id: this.form.id,
-                checkType: 'CK',
-                status: this.form.status,
-                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.subLoading = false
-                this.getDetail(this.form.id)
-              })
-            })
-          }
-        })
       }
     },
     revokeCheck() {

+ 2 - 2
src/views/wel/home/jiatongPage/components/sales-reached.vue

@@ -151,8 +151,8 @@ export default {
               show: false
             },
             data: [
-              { value: Number(this.data.reachAmount), name: "已审核数量" },
-              { value: Number(this.data.notReachAmount), name: "未审核数量" }
+              { value: Number(this.data.grossAmount), name: "已审核数量" },
+              { value: Number(this.data.reachAmount), name: "未审核数量" }
             ]
           }
         ]