| | |
| | | </div> |
| | | <div class="form-group"> |
| | | <el-form-item label="附件" prop="fujian"> |
| | | <el-upload |
| | | class="upload-demo" |
| | | ref="upload" |
| | | action="" |
| | | :on-preview="handleFilePreview" |
| | | :on-remove="handleFileRemove" |
| | | :on-change="handleFileChange" |
| | | :file-list="fileList" |
| | | :auto-upload="false" |
| | | :limit="10" |
| | | :on-exceed="handleExceed" |
| | | <el-upload class="upload-demo" ref="upload" action="" :on-preview="handleFilePreview" |
| | | :on-remove="handleFileRemove" :on-change="handleFileChange" :file-list="fileList" |
| | | :auto-upload="false" :limit="10" :on-exceed="handleExceed" |
| | | accept=".jpg,.png,.jpeg,.pdf,.doc,.docx,.xls,.xlsx,.zip,.rar"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">支持上传jpg/png/jpeg/pdf/doc/docx/xls/xlsx/zip/rar格式文件,最多10个</div> |
| | | <div slot="tip" class="el-upload__tip"> |
| | | 支持上传jpg/png/jpeg/pdf/doc/docx/xls/xlsx/zip/rar格式文件,最多10个</div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </div> |
| | |
| | | try { |
| | | // 显示源单数据加载状态 |
| | | this.sourceDataLoading = true; |
| | | |
| | | var dataArray = []; |
| | | |
| | | // 使用Promise.all等待所有异步请求完成 |
| | | const promises = checkStatus.map(async (item) => { |
| | | const temp = await this.getPushSeOutStockBillInit(item.hmainid, item.hsubid); |
| | | return temp; |
| | | }); |
| | | |
| | | const results = await Promise.all(promises); |
| | | |
| | | // 过滤掉null值 |
| | | for (const result of results) { |
| | | if (result) { |
| | |
| | | return; |
| | | } |
| | | } |
| | | |
| | | // 获取现有子表数据 |
| | | var existingData = this.editData || []; |
| | | var orginHQTY = 0; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 创建物料ID映射 |
| | | var materialMap = {}; |
| | | for (var i = 0; i < dataArray.length; i++) { |
| | | console.log(dataArray) |
| | | orginHQTY = dataArray[i].数量; |
| | | var materialId = dataArray[i].HMaterID; |
| | | console.log(materialId) |
| | | if (!materialMap[materialId]) { |
| | | materialMap[materialId] = []; |
| | | } |
| | |
| | | 单据号: dataArray[i].单据号 |
| | | }); |
| | | } |
| | | |
| | | // 获取所有物料ID |
| | | var ListMaterial = ""; |
| | | for (var materialId in materialMap) { |
| | | if (ListMaterial) ListMaterial += ";"; |
| | | ListMaterial += materialId; |
| | | } |
| | | |
| | | if (!ListMaterial) { |
| | | if (!ListMaterial) { |
| | | this.$modal.msgError("没有找到物料信息,请检查选择的源单是否包含有效的物料数据!"); |
| | | this.sourceDataLoading = false; |
| | | return; |
| | | } |
| | | |
| | | const response = await axios.get(this.baseURL + '/WLYayBillController/GetMesByOrginBill_1', { |
| | | let hmainidVal = [] |
| | | for (var i = 0; i < dataArray.length; i++) { |
| | | hmainidVal[i] = dataArray[i].hmainid |
| | | } |
| | | // const response = await axios.get(this.baseURL + '/WLYayBillController/GetMesByOrginBill_1', { |
| | | const response = await axios.get(this.baseURL + '/WLYayBillController/GetList', { |
| | | params: { |
| | | "ListMaterial": ListMaterial |
| | | "user": sessionStorage["HUserName"], |
| | | "hmainid": hmainidVal.join(',') |
| | | }, |
| | | }); |
| | | console.log('源单详情', response) |
| | | let result = response.data; |
| | | if (result.count == 1) { |
| | | let res = result.data; |