|  | @@ -11,37 +11,6 @@
 | 
	
		
			
				|  |  |          :hidedata="hidedata"
 | 
	
		
			
				|  |  |          @handleClick="handleClick"
 | 
	
		
			
				|  |  |        />
 | 
	
		
			
				|  |  | -      <!--      <div style="width:40%;margin-left:60%;margin-bottom: -10%">-->
 | 
	
		
			
				|  |  | -      <!--        <el-button-->
 | 
	
		
			
				|  |  | -      <!--          type="success"-->
 | 
	
		
			
				|  |  | -      <!--          plain-->
 | 
	
		
			
				|  |  | -      <!--          icon="el-icon-search"-->
 | 
	
		
			
				|  |  | -      <!--          size="mini"-->
 | 
	
		
			
				|  |  | -      <!--          @click="handleQuery"-->
 | 
	
		
			
				|  |  | -      <!--        >搜索</el-button-->
 | 
	
		
			
				|  |  | -      <!--        >-->
 | 
	
		
			
				|  |  | -      <!--        <el-button-->
 | 
	
		
			
				|  |  | -      <!--          type="warning"-->
 | 
	
		
			
				|  |  | -      <!--          plain-->
 | 
	
		
			
				|  |  | -      <!--          icon="el-icon-refresh-left"-->
 | 
	
		
			
				|  |  | -      <!--          size="mini"-->
 | 
	
		
			
				|  |  | -      <!--          @click="resetQuery"-->
 | 
	
		
			
				|  |  | -      <!--        >重置</el-button-->
 | 
	
		
			
				|  |  | -      <!--        >-->
 | 
	
		
			
				|  |  | -      <!--        <el-button-->
 | 
	
		
			
				|  |  | -      <!--          type="info"-->
 | 
	
		
			
				|  |  | -      <!--          plain-->
 | 
	
		
			
				|  |  | -      <!--          icon="el-icon-open"-->
 | 
	
		
			
				|  |  | -      <!--          @click="handleClick"-->
 | 
	
		
			
				|  |  | -      <!--          :icon="arrow"-->
 | 
	
		
			
				|  |  | -      <!--          size="mini"-->
 | 
	
		
			
				|  |  | -      <!--        >展开</el-button-->
 | 
	
		
			
				|  |  | -      <!--        >-->
 | 
	
		
			
				|  |  | -      <!--        <right-toolbar-->
 | 
	
		
			
				|  |  | -      <!--          @showSearch="showSearch"-->
 | 
	
		
			
				|  |  | -      <!--          @queryTable="getList"-->
 | 
	
		
			
				|  |  | -      <!--        ></right-toolbar>-->
 | 
	
		
			
				|  |  | -      <!--      </div>-->
 | 
	
		
			
				|  |  |        <listComponent
 | 
	
		
			
				|  |  |          style="clear:both"
 | 
	
		
			
				|  |  |          v-if="waitFor"
 | 
	
	
		
			
				|  | @@ -78,6 +47,7 @@
 | 
	
		
			
				|  |  |          :show="show = true"
 | 
	
		
			
				|  |  |          :inDex="inDex"
 | 
	
		
			
				|  |  |          @backRules="backRules"
 | 
	
		
			
				|  |  | +        @backSave="backSave"
 | 
	
		
			
				|  |  |          @handleClick="handleClick"
 | 
	
		
			
				|  |  |          @verificationRules="verificationRules"
 | 
	
		
			
				|  |  |          @changeWarehouse="changeWarehouse"
 | 
	
	
		
			
				|  | @@ -510,6 +480,7 @@ export default {
 | 
	
		
			
				|  |  |        //详情主表
 | 
	
		
			
				|  |  |        detailOption:[
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | +          index:'1',
 | 
	
		
			
				|  |  |            span:6,
 | 
	
		
			
				|  |  |            label: 'fBillno',
 | 
	
		
			
				|  |  |            name:"系统编号",
 | 
	
	
		
			
				|  | @@ -521,6 +492,7 @@ export default {
 | 
	
		
			
				|  |  |            doNot:'1'
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | +          index:'2',
 | 
	
		
			
				|  |  |            span:6,
 | 
	
		
			
				|  |  |            label: 'fCorpid',
 | 
	
		
			
				|  |  |            name:"供应商",
 | 
	
	
		
			
				|  | @@ -532,6 +504,7 @@ export default {
 | 
	
		
			
				|  |  |            disabled:false
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | +          index:'3',
 | 
	
		
			
				|  |  |            span:6,
 | 
	
		
			
				|  |  |            label: 'fStorekeeper',
 | 
	
		
			
				|  |  |            name:"库管员",
 | 
	
	
		
			
				|  | @@ -543,6 +516,7 @@ export default {
 | 
	
		
			
				|  |  |            disabled:false
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | +          index:'4',
 | 
	
		
			
				|  |  |            span:6,
 | 
	
		
			
				|  |  |            label: 'fWarehouseid',
 | 
	
		
			
				|  |  |            name:"仓库",
 | 
	
	
		
			
				|  | @@ -553,6 +527,7 @@ export default {
 | 
	
		
			
				|  |  |            data:[],
 | 
	
		
			
				|  |  |            disabled:false
 | 
	
		
			
				|  |  |          }, {
 | 
	
		
			
				|  |  | +          index:'5',
 | 
	
		
			
				|  |  |            span:6,
 | 
	
		
			
				|  |  |            label: 'fSbu',
 | 
	
		
			
				|  |  |            name:"付款单位",
 | 
	
	
		
			
				|  | @@ -564,6 +539,7 @@ export default {
 | 
	
		
			
				|  |  |            disabled:false
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | +          index:'6',
 | 
	
		
			
				|  |  |            span:6,
 | 
	
		
			
				|  |  |            label: 'fBsdate',
 | 
	
		
			
				|  |  |            name:"出库日期",
 | 
	
	
		
			
				|  | @@ -574,6 +550,7 @@ export default {
 | 
	
		
			
				|  |  |            disabled:false
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | +          index:'7',
 | 
	
		
			
				|  |  |            span:6,
 | 
	
		
			
				|  |  |            label: 'remark',
 | 
	
		
			
				|  |  |            name:"备注",
 | 
	
	
		
			
				|  | @@ -979,15 +956,17 @@ export default {
 | 
	
		
			
				|  |  |        console.log(scope)
 | 
	
		
			
				|  |  |        this.detailList.columnList = this.detailStyle
 | 
	
		
			
				|  |  |        getSave(scope.row.fId).then(res=>{
 | 
	
		
			
				|  |  | -        if(res.data.warehouseBills){
 | 
	
		
			
				|  |  | -          this.detailForm = res.data.warehouseBills
 | 
	
		
			
				|  |  | -          this.$set(this.detailForm,'fStorekeeper',JSON.parse(this.detailForm.fStorekeeper))
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        if(res.data.tWarehousebillsfees){
 | 
	
		
			
				|  |  | -          this.detailData = res.data.tWarehousebillsfees
 | 
	
		
			
				|  |  | -          for(let li in this.detailData){
 | 
	
		
			
				|  |  | -            this.$set(this.detailData[li],'fFeeunitid',JSON.stringify(this.detailData[li].fFeeunitid))
 | 
	
		
			
				|  |  | -            this.$set(this.detailData[li],'fStltypeid',JSON.stringify(this.detailData[li].fStltypeid))
 | 
	
		
			
				|  |  | +        if(res.code == 200){
 | 
	
		
			
				|  |  | +          if(res.data.warehouseBills){
 | 
	
		
			
				|  |  | +            this.detailForm = res.data.warehouseBills
 | 
	
		
			
				|  |  | +            this.$set(this.detailForm,'fStorekeeper',JSON.parse(this.detailForm.fStorekeeper))
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          if(res.data.tWarehousebillsfees){
 | 
	
		
			
				|  |  | +            this.detailData = res.data.tWarehousebillsfees
 | 
	
		
			
				|  |  | +            for(let li in this.detailData){
 | 
	
		
			
				|  |  | +              this.$set(this.detailData[li],'fFeeunitid',JSON.stringify(this.detailData[li].fFeeunitid))
 | 
	
		
			
				|  |  | +              this.$set(this.detailData[li],'fStltypeid',JSON.stringify(this.detailData[li].fStltypeid))
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          for(let li in this.detailStyle){
 | 
	
	
		
			
				|  | @@ -998,13 +977,10 @@ export default {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          for(let li in this.detailButton){
 | 
	
		
			
				|  |  |            if(this.detailForm.fBillstatus == '6'){
 | 
	
		
			
				|  |  | -            console.log("111")
 | 
	
		
			
				|  |  |              if(this.detailButton[li].name == '返回列表'){
 | 
	
		
			
				|  |  |                this.detailButton[li].disabled = false
 | 
	
		
			
				|  |  | -              // console.log("222")
 | 
	
		
			
				|  |  |              }else {
 | 
	
		
			
				|  |  |                this.detailButton[li].disabled = true
 | 
	
		
			
				|  |  | -              // console.log("333")
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |            } else {
 | 
	
		
			
				|  |  |              if(this.detailButton[li].name == '返回列表' || this.detailButton[li].name == '修改'){
 | 
	
	
		
			
				|  | @@ -1015,19 +991,16 @@ export default {
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          getArea(this.detailForm.fWarehouseid).then(res=>{
 | 
	
		
			
				|  |  | -          this.listData.fWarehouseid = []
 | 
	
		
			
				|  |  | -          for(let item in res.data){
 | 
	
		
			
				|  |  | -            this.listData.fWarehouseid.push({
 | 
	
		
			
				|  |  | -              label:res.data[item].fWarehouseInformation,
 | 
	
		
			
				|  |  | -              value:res.data[item].id
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | +          if(res.code == 200){
 | 
	
		
			
				|  |  | +            this.listData.fWarehouseid = []
 | 
	
		
			
				|  |  | +            for(let item in res.data){
 | 
	
		
			
				|  |  | +              this.listData.fWarehouseid.push({
 | 
	
		
			
				|  |  | +                label:res.data[item].fWarehouseInformation,
 | 
	
		
			
				|  |  | +                value:res.data[item].id
 | 
	
		
			
				|  |  | +              })
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  | -        for(let li in this.detailStyle){
 | 
	
		
			
				|  |  | -          if(this.detailStyle[li].name == '库区'){
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  |          this.MainTable = true
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
	
		
			
				|  | @@ -1089,19 +1062,21 @@ export default {
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |            .then(()=>{
 | 
	
		
			
				|  |  |              getSave(this.detailForm.fId).then(res=>{
 | 
	
		
			
				|  |  | -              if(res.data.warehouseBills){
 | 
	
		
			
				|  |  | -                this.detailForm = res.data.warehouseBills
 | 
	
		
			
				|  |  | -                this.$set(this.detailForm,'fStorekeeper',JSON.parse(this.detailForm.fStorekeeper))
 | 
	
		
			
				|  |  | -              }
 | 
	
		
			
				|  |  | -              if(res.data.tWarehousebillsfees){
 | 
	
		
			
				|  |  | -                this.detailData = res.data.tWarehousebillsfees
 | 
	
		
			
				|  |  | -                for(let li in this.detailData){
 | 
	
		
			
				|  |  | -                  this.$set(this.detailData[li],'fFeeunitid',JSON.stringify(this.detailData[li].fFeeunitid))
 | 
	
		
			
				|  |  | -                  this.$set(this.detailData[li],'fStltypeid',JSON.stringify(this.detailData[li].fStltypeid))
 | 
	
		
			
				|  |  | +              if(res.code == 200){
 | 
	
		
			
				|  |  | +                if(res.data.warehouseBills){
 | 
	
		
			
				|  |  | +                  this.detailForm = res.data.warehouseBills
 | 
	
		
			
				|  |  | +                  this.$set(this.detailForm,'fStorekeeper',JSON.parse(this.detailForm.fStorekeeper))
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | +                if(res.data.tWarehousebillsfees){
 | 
	
		
			
				|  |  | +                  this.detailData = res.data.tWarehousebillsfees
 | 
	
		
			
				|  |  | +                  for(let li in this.detailData){
 | 
	
		
			
				|  |  | +                    this.$set(this.detailData[li],'fFeeunitid',JSON.stringify(this.detailData[li].fFeeunitid))
 | 
	
		
			
				|  |  | +                    this.$set(this.detailData[li],'fStltypeid',JSON.stringify(this.detailData[li].fStltypeid))
 | 
	
		
			
				|  |  | +                  }
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +                this.msgSuccess("删除成功");
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  | -            this.msgSuccess("删除成功");
 | 
	
		
			
				|  |  |            })
 | 
	
		
			
				|  |  |            .catch(res=>{
 | 
	
		
			
				|  |  |              this.$message.error(res)
 | 
	
	
		
			
				|  | @@ -1112,7 +1087,6 @@ export default {
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //必填项
 | 
	
		
			
				|  |  |      verificationRules(valid){
 | 
	
		
			
				|  |  | -      console.log(valid)
 | 
	
		
			
				|  |  |        if(valid){
 | 
	
		
			
				|  |  |          this.detailData.push({
 | 
	
		
			
				|  |  |            serialNumber:null,
 | 
	
	
		
			
				|  | @@ -1144,7 +1118,8 @@ export default {
 | 
	
		
			
				|  |  |                cancelButtonText: "取消",
 | 
	
		
			
				|  |  |                type: "warning",
 | 
	
		
			
				|  |  |              }).then(() => {
 | 
	
		
			
				|  |  | -              this.$refs.detailForm.saveRules()
 | 
	
		
			
				|  |  | +              this.$refs.detailForm.saveRules('1')
 | 
	
		
			
				|  |  | +              // this.MainTable = false
 | 
	
		
			
				|  |  |              }).catch(() => {
 | 
	
		
			
				|  |  |                this.show = false
 | 
	
		
			
				|  |  |                // row.icon = 'el-icon-arrow-up'
 | 
	
	
		
			
				|  | @@ -1155,7 +1130,7 @@ export default {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    backSave(valid){
 | 
	
		
			
				|  |  | +    backSave(valid,i){
 | 
	
		
			
				|  |  |        if(valid){
 | 
	
		
			
				|  |  |          this.detailForm.fMoney = 0
 | 
	
		
			
				|  |  |          for(let li in this.detailData){
 | 
	
	
		
			
				|  | @@ -1168,18 +1143,26 @@ export default {
 | 
	
		
			
				|  |  |          formData.append('tWarehousebillsfees', JSON.stringify(this.detailData))
 | 
	
		
			
				|  |  |          formData.append('fBilltype', 'CK')
 | 
	
		
			
				|  |  |          addSave(formData).then(res=>{
 | 
	
		
			
				|  |  | -          this.$message.success("操作成功")
 | 
	
		
			
				|  |  | -          this.MainTable = false
 | 
	
		
			
				|  |  | -          this.getList();
 | 
	
		
			
				|  |  | -          this.show = false
 | 
	
		
			
				|  |  | -          row.icon = 'el-icon-arrow-up'
 | 
	
		
			
				|  |  | +          if(res.code == 200){
 | 
	
		
			
				|  |  | +            this.detailForm = res.data.warehouseBills
 | 
	
		
			
				|  |  | +            this.$set(this.detailForm,'fStorekeeper',JSON.parse(this.detailForm.fStorekeeper))
 | 
	
		
			
				|  |  | +            this.detailData = res.data.tWarehousebillsCntrs
 | 
	
		
			
				|  |  | +            for(let li in this.detailData){
 | 
	
		
			
				|  |  | +              this.$set(this.detailData[li],'fFeeunitid',JSON.stringify(this.detailData[li].fFeeunitid))
 | 
	
		
			
				|  |  | +              this.$set(this.detailData[li],'fStltypeid',JSON.stringify(this.detailData[li].fStltypeid))
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            this.$message.success("操作成功")
 | 
	
		
			
				|  |  | +            this.getList();
 | 
	
		
			
				|  |  | +            if(i == 1){
 | 
	
		
			
				|  |  | +              this.MainTable = false
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      //所以按钮
 | 
	
		
			
				|  |  |      buttonList(row){
 | 
	
		
			
				|  |  |        console.log(row)
 | 
	
		
			
				|  |  | -      console.log(this.detailStyle)
 | 
	
		
			
				|  |  |        if(row.name == '新增'){
 | 
	
		
			
				|  |  |          this.detailList.columnList = this.detailStyle
 | 
	
		
			
				|  |  |          this.detailForm = {}
 | 
	
	
		
			
				|  | @@ -1205,27 +1188,7 @@ export default {
 | 
	
		
			
				|  |  |        }else if(row.name == '返回列表'){
 | 
	
		
			
				|  |  |          this.backRules()
 | 
	
		
			
				|  |  |        }else if(row.name == '保存'){
 | 
	
		
			
				|  |  | -        this.detailForm.fMoney = 0
 | 
	
		
			
				|  |  | -        for(let li in this.detailData){
 | 
	
		
			
				|  |  | -          if(this.detailData[li]){
 | 
	
		
			
				|  |  | -            this.detailForm.fMoney += Number(this.detailData[li].fAmount)
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        let formData = new window.FormData();
 | 
	
		
			
				|  |  | -        formData.append('tWarehousebills', JSON.stringify(this.detailForm))
 | 
	
		
			
				|  |  | -        formData.append('tWarehousebillsfees', JSON.stringify(this.detailData))
 | 
	
		
			
				|  |  | -        formData.append('fBilltype', 'CK')
 | 
	
		
			
				|  |  | -        addSave(formData).then(res=>{
 | 
	
		
			
				|  |  | -          console.log(res)
 | 
	
		
			
				|  |  | -          this.detailForm = res.data.warehouseBills
 | 
	
		
			
				|  |  | -          this.$set(this.detailForm,'fStorekeeper',JSON.parse(this.detailForm.fStorekeeper))
 | 
	
		
			
				|  |  | -          this.detailData = res.data.tWarehousebillsCntrs
 | 
	
		
			
				|  |  | -          for(let li in this.detailData){
 | 
	
		
			
				|  |  | -            this.$set(this.detailData[li],'fFeeunitid',JSON.stringify(this.detailData[li].fFeeunitid))
 | 
	
		
			
				|  |  | -            this.$set(this.detailData[li],'fStltypeid',JSON.stringify(this.detailData[li].fStltypeid))
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | -          this.$message.success("操作成功")
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | +        this.$refs.detailForm.saveRules()
 | 
	
		
			
				|  |  |        }else if(row.name == '出库确认'){
 | 
	
		
			
				|  |  |          for(let item in this.detailData) {
 | 
	
		
			
				|  |  |            let num = Number(item) + 1
 |