|  | @@ -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 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)
 | 
	
		
			
				|  |  | +                  })
 | 
	
		
			
				|  |  | +                })
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +      } 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() {
 |