| | |
| | | </el-row> |
| | | <el-table :data="mItem" :stripe="true"> |
| | | <!-- A类商品显示 --> |
| | | <el-table-column width="100" prop="price" label="使用人" align="center" v-if="mItem[0].nowUserName"> |
| | | <el-table-column prop="price" label="使用人" align="center" v-if="mItem[0].nowUserName"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.nowUserName }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column width="100" prop="price" label="分发数量" align="center"> |
| | | <el-table-column prop="price" label="分发数量" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.goodsNum }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column width="100" prop="price" label="可退数量" align="center"> |
| | | <el-table-column prop="price" label="可退数量" align="center"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.userUseCount }} |
| | | </template> |
| | |
| | | ]" |
| | | > |
| | | <el-input |
| | | clearable |
| | | type="number" |
| | | v-model.number="row.counts" |
| | | ></el-input> |
| | |
| | | fenfaData: [], |
| | | formData: { |
| | | departmentId: '', // 退回部门id |
| | | dealTime: '', // 退回时间 |
| | | dealTime: DateFormatter.formatDate(new Date(), 'yyyyMMddhhmmss'), // 退回时间 |
| | | procureDoc: '', |
| | | goods: [], |
| | | }, |
| | |
| | | title: '上传', |
| | | max: 20, // 最大大小,单位M |
| | | num: 10, // 支持上传图片个数 |
| | | accept: '.jpg,.png', // 限制格式 |
| | | tip: '', // 提示 默认:`只能上传${this.defaultSettings.num}个${this.defaultSettings.accept}文件,且不超过${this.defaultSettings.max}kb` |
| | | uploadUrl: getUploadUrl(), // 上传路径 |
| | | multiple: true, // 是否支持批量上传 |
| | | disabled: false, // 是否禁用 |
| | | type: 'picture', // text/picture |
| | | }, |
| | | }; |
| | | }, |
| | |
| | | }).then(res => { |
| | | this.loading = false |
| | | if (!res || res.length === 0) { |
| | | this.$message.error('未查询到分发单'); |
| | | this.$message.error('未查询到需要退回的分发单'); |
| | | return |
| | | } |
| | | this.fenfaSetting.show = true |
| | |
| | | this.$refs['ruleForm'].validate((valid) => { |
| | | if (valid) { |
| | | let params = JSON.parse(JSON.stringify(this.formData)) |
| | | params.goods.map((g, gid) => { |
| | | params.goods.map(g => { |
| | | delete g.goodsOptions |
| | | let arr = [] |
| | | g.models.map(m => { |
| | | arr = arr.concat(m) |
| | | m.map(item=>{ |
| | | if(item.counts&&item.counts>0){ |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | }) |
| | | g.models = arr |
| | | }) |
| | | params.goods = params.goods.filter(g=>g.models.length>0) |
| | | if(params.goods.length===0){ |
| | | this.$message.error('请至少填写一个退回物品'); |
| | | return; |
| | | } |
| | | if (this.loading) return |
| | | this.loading = true |
| | | returnAdd(params) |