| | |
| | | </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: [], |
| | | }, |
| | |
| | | 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) |