|  | @@ -1390,6 +1390,7 @@
 | 
	
		
			
				|  |  |                prop="createTime"
 | 
	
		
			
				|  |  |                header-align="center"
 | 
	
		
			
				|  |  |                align="center"
 | 
	
		
			
				|  |  | +              width="200px"
 | 
	
		
			
				|  |  |                label="上传时间"
 | 
	
		
			
				|  |  |              >
 | 
	
		
			
				|  |  |                <template slot-scope="scope">
 | 
	
	
		
			
				|  | @@ -1410,8 +1411,21 @@
 | 
	
		
			
				|  |  |                width="300px"
 | 
	
		
			
				|  |  |                label="上传附件"
 | 
	
		
			
				|  |  |              >
 | 
	
		
			
				|  |  | -              <template slot-scope="scope">
 | 
	
		
			
				|  |  | -                <uploadFile @input="showFile" v-model="scope.row.fUrl" />
 | 
	
		
			
				|  |  | +              <template slot-scope="scope" >
 | 
	
		
			
				|  |  | +                <el-upload
 | 
	
		
			
				|  |  | +                  class="upload-demo"
 | 
	
		
			
				|  |  | +                  :action="uploadImgUrl"
 | 
	
		
			
				|  |  | +                  :on-success="(res,file)=>{handleSucces(scope,res,file)}"
 | 
	
		
			
				|  |  | +                  :headers="headers"
 | 
	
		
			
				|  |  | +                  style="width:25%;float: left"
 | 
	
		
			
				|  |  | +                  :disabled="browseStatus"
 | 
	
		
			
				|  |  | +                  :show-file-list="false"
 | 
	
		
			
				|  |  | +                  :limit="1"
 | 
	
		
			
				|  |  | +                >
 | 
	
		
			
				|  |  | +                  <el-button size="small" type="primary" :disabled="browseStatus">点击上传</el-button>
 | 
	
		
			
				|  |  | +                </el-upload>
 | 
	
		
			
				|  |  | +                <el-button size="small" type="primary" @click="checkFile(scope)">查看</el-button>
 | 
	
		
			
				|  |  | +                <el-button size="small" type="primary" :disabled="browseStatus" @click="deleteFile(scope)">删除</el-button>
 | 
	
		
			
				|  |  |                </template>
 | 
	
		
			
				|  |  |              </el-table-column>
 | 
	
		
			
				|  |  |              <el-table-column header-align="center" align="center" label="操作">
 | 
	
	
		
			
				|  | @@ -2671,6 +2685,7 @@ import {
 | 
	
		
			
				|  |  |    warehouseSubmission,
 | 
	
		
			
				|  |  |    updateStockTransfer,
 | 
	
		
			
				|  |  |    exportStockTransfer,
 | 
	
		
			
				|  |  | +  serialNumber
 | 
	
		
			
				|  |  |  } from "@/api/warehouseBusiness/stockTransfer";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
 | 
	
	
		
			
				|  | @@ -2697,6 +2712,7 @@ import AddOrUpdate from '@/views/viewApproval'
 | 
	
		
			
				|  |  |  import ApprovalComments from '@/views/startApproval'
 | 
	
		
			
				|  |  |  import Treeselect from '@riophae/vue-treeselect'
 | 
	
		
			
				|  |  |  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 | 
	
		
			
				|  |  | +import { getToken } from '@/utils/auth'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "Warehousebills",
 | 
	
	
		
			
				|  | @@ -2708,6 +2724,10 @@ export default {
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    data() {
 | 
	
		
			
				|  |  |      return {
 | 
	
		
			
				|  |  | +      headers: {
 | 
	
		
			
				|  |  | +        Authorization: 'Bearer ' + getToken()
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
 | 
	
		
			
				|  |  |        company:'',
 | 
	
		
			
				|  |  |        fSerialNumber:'',
 | 
	
		
			
				|  |  |        fCNameOptions:[],
 | 
	
	
		
			
				|  | @@ -2782,11 +2802,11 @@ export default {
 | 
	
		
			
				|  |  |        fTaxrate: null,
 | 
	
		
			
				|  |  |        // 选中数组
 | 
	
		
			
				|  |  |        ids: [],
 | 
	
		
			
				|  |  | -      userVal: {
 | 
	
		
			
				|  |  | -        userName: null,
 | 
	
		
			
				|  |  | -        nickName: null,
 | 
	
		
			
				|  |  | -        deptId: null,
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | +      // userVal: {
 | 
	
		
			
				|  |  | +      //   userName: null,
 | 
	
		
			
				|  |  | +      //   nickName: null,
 | 
	
		
			
				|  |  | +      //   deptId: null,
 | 
	
		
			
				|  |  | +      // },
 | 
	
		
			
				|  |  |        queryForm: {},
 | 
	
		
			
				|  |  |        // 费用状态
 | 
	
		
			
				|  |  |        costStatus: 'Dr',
 | 
	
	
		
			
				|  | @@ -3012,6 +3032,25 @@ export default {
 | 
	
		
			
				|  |  |      this.Jump()
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | +    deleteFile(scope){
 | 
	
		
			
				|  |  | +      this.relevantAttachments[scope.$index].fName = ''
 | 
	
		
			
				|  |  | +      this.relevantAttachments[scope.$index].fUrl = ''
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    checkFile(scope){
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      if(this.relevantAttachments[scope.$index].fUrl){
 | 
	
		
			
				|  |  | +        window.open(this.relevantAttachments[scope.$index].fUrl)
 | 
	
		
			
				|  |  | +      }else{
 | 
	
		
			
				|  |  | +        this.$message.error("请上传附件")
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    handleSucces(scope,res,file){
 | 
	
		
			
				|  |  | +      this.relevantAttachments[scope.$index].fName = res.fileName
 | 
	
		
			
				|  |  | +      this.relevantAttachments[scope.$index].fUrl = res.url
 | 
	
		
			
				|  |  | +      if(this.relevantAttachments[scope.$index].fUrl === ''){
 | 
	
		
			
				|  |  | +        this.$message.error('上传失败')
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      //合计
 | 
	
		
			
				|  |  |      getSum(param){
 | 
	
		
			
				|  |  |        const { columns, data } = param
 | 
	
	
		
			
				|  | @@ -3283,10 +3322,10 @@ export default {
 | 
	
		
			
				|  |  |                this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | -          if (response.data.sysUser) {
 | 
	
		
			
				|  |  | -            this.userVal = response.data.sysUser
 | 
	
		
			
				|  |  | -            this.userOptions = response.data.sysUser;
 | 
	
		
			
				|  |  | -          }
 | 
	
		
			
				|  |  | +          // if (response.data.sysUser) {
 | 
	
		
			
				|  |  | +          //   // this.userVal = response.data.sysUser
 | 
	
		
			
				|  |  | +          //   this.userOptions = response.data.sysUser;
 | 
	
		
			
				|  |  | +          // }
 | 
	
		
			
				|  |  |            if (response.data.dept) {
 | 
	
		
			
				|  |  |              this.deptOptions = []
 | 
	
		
			
				|  |  |              this.deptOptions.push(response.data.dept)
 | 
	
	
		
			
				|  | @@ -3780,7 +3819,14 @@ export default {
 | 
	
		
			
				|  |  |          this.openPrintJobSheet = true
 | 
	
		
			
				|  |  |          this.fBstime = this.form.fBstime
 | 
	
		
			
				|  |  |        }, 200);
 | 
	
		
			
				|  |  | -      this.fSerialNumber = this.dataList[0].fSerialNumber
 | 
	
		
			
				|  |  | +      if(!this.dataListSelection[0].fSerialNumber){
 | 
	
		
			
				|  |  | +        serialNumber().then(response =>{
 | 
	
		
			
				|  |  | +          console.log(response)
 | 
	
		
			
				|  |  | +          this.fSerialNumber = response.data.fSerialNumber
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +      }else{
 | 
	
		
			
				|  |  | +        this.fSerialNumber = this.dataListSelection[0].fSerialNumber
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  |        for(let item in this.businessTypeOption){
 | 
	
		
			
				|  |  |          if(this.form.fBusinessType == this.businessTypeOption[item].dictValue){
 | 
	
		
			
				|  |  |            this.businessType = this.businessTypeOption[item].dictLabel
 | 
	
	
		
			
				|  | @@ -4062,6 +4108,7 @@ export default {
 | 
	
		
			
				|  |  |        this.detailsHidden = false;
 | 
	
		
			
				|  |  |        let data = row || this.ids;
 | 
	
		
			
				|  |  |        getStockTransfer(data.fId).then((response) => {
 | 
	
		
			
				|  |  | +        console.log(response)
 | 
	
		
			
				|  |  |          this.Operator = response.data.corps[0].createBy
 | 
	
		
			
				|  |  |          if (response.data.warehousebills) {
 | 
	
		
			
				|  |  |            this.form = response.data.warehousebills;
 | 
	
	
		
			
				|  | @@ -4111,10 +4158,12 @@ export default {
 | 
	
		
			
				|  |  |              this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + "");
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        if (response.data.sysUser) {
 | 
	
		
			
				|  |  | -          this.userVal = response.data.sysUser
 | 
	
		
			
				|  |  | -          this.userOptions = response.data.sysUser;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +        // if (response.data.sysUser) {
 | 
	
		
			
				|  |  | +        //   // this.userVal = response.data.sysUser
 | 
	
		
			
				|  |  | +        //   this.userOptions = response.data.sysUser;
 | 
	
		
			
				|  |  | +        //   console.log(response.data.sysUser)
 | 
	
		
			
				|  |  | +        //   console.log(response.data.sysUser)
 | 
	
		
			
				|  |  | +        //  }
 | 
	
		
			
				|  |  |          if (response.data.dept) {
 | 
	
		
			
				|  |  |            this.deptOptions = []
 | 
	
		
			
				|  |  |            this.deptOptions.push(response.data.dept)
 | 
	
	
		
			
				|  | @@ -4153,6 +4202,7 @@ export default {
 | 
	
		
			
				|  |  |        this.detailsHidden = false;
 | 
	
		
			
				|  |  |        let data = row || this.ids;
 | 
	
		
			
				|  |  |        getStockTransfer(data.fId).then((response) => {
 | 
	
		
			
				|  |  | +        console.log(response)
 | 
	
		
			
				|  |  |          this.Operator = response.data.corps[0].createBy
 | 
	
		
			
				|  |  |          if (response.data.warehousebills) {
 | 
	
		
			
				|  |  |            this.form = response.data.warehousebills;
 | 
	
	
		
			
				|  | @@ -4207,7 +4257,7 @@ export default {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (response.data.sysUser) {
 | 
	
		
			
				|  |  |            this.userVal = response.data.sysUser
 | 
	
		
			
				|  |  | -          this.userOptions = response.data.sysUser;
 | 
	
		
			
				|  |  | +          // this.userOptions = response.data.sysUser;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          if (response.data.dept) {
 | 
	
		
			
				|  |  |            this.deptOptions = []
 | 
	
	
		
			
				|  | @@ -4309,9 +4359,11 @@ export default {
 | 
	
		
			
				|  |  |              this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        if (response.data.sysUser) {
 | 
	
		
			
				|  |  | -          this.userVal = response.data.sysUser
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +        // if (response.data.sysUser) {
 | 
	
		
			
				|  |  | +        //   // this.userVal = response.data.sysUser
 | 
	
		
			
				|  |  | +        //   this.userOptions = response.data.sysUser;
 | 
	
		
			
				|  |  | +        //
 | 
	
		
			
				|  |  | +        // }
 | 
	
		
			
				|  |  |          if (response.data.dept) {
 | 
	
		
			
				|  |  |            this.deptOptions = []
 | 
	
		
			
				|  |  |            this.deptOptions.push(response.data.dept)
 | 
	
	
		
			
				|  | @@ -4622,7 +4674,8 @@ export default {
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |                if (response.data.sysUser) {
 | 
	
		
			
				|  |  | -                this.userVal = response.data.sysUser
 | 
	
		
			
				|  |  | +                // this.userVal = response.data.sysUser
 | 
	
		
			
				|  |  | +                this.userOptions = response.data.sysUser;
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |                if (response.data.dept) {
 | 
	
		
			
				|  |  |                  this.deptOptions = []
 | 
	
	
		
			
				|  | @@ -4697,6 +4750,7 @@ export default {
 | 
	
		
			
				|  |  |                dataList.push(this.dataListSelection[se])
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  | +          dataList[0].fSerialNumber = this.fSerialNumber
 | 
	
		
			
				|  |  |            if (dataList.length !== 0) {
 | 
	
		
			
				|  |  |              let formData = new window.FormData();
 | 
	
		
			
				|  |  |              formData.append("warehouseBills", JSON.stringify(this.form));
 | 
	
	
		
			
				|  | @@ -4704,8 +4758,10 @@ export default {
 | 
	
		
			
				|  |  |              formData.append("warehousebillsitems", JSON.stringify(dataList));
 | 
	
		
			
				|  |  |              formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
 | 
	
		
			
				|  |  |              formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
 | 
	
		
			
				|  |  | +            console.log(dataList)
 | 
	
		
			
				|  |  |              for(let index in dataList){
 | 
	
		
			
				|  |  |                if(dataList[index].fBillstatus < 20) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |                  addJoblist(formData).then((response) => {
 | 
	
		
			
				|  |  |                    this.formBrowseStatus = true;
 | 
	
		
			
				|  |  |                    // this.$refs.tableDr.clearSelection();
 | 
	
	
		
			
				|  | @@ -4722,6 +4778,7 @@ export default {
 | 
	
		
			
				|  |  |                    }
 | 
	
		
			
				|  |  |                    this.$refs.tableList.clearSelection()
 | 
	
		
			
				|  |  |                  });
 | 
	
		
			
				|  |  | +                return
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |            }
 |