| | |
| | | <a-row> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="报损单单号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderCode"> |
| | | <a-input v-model="model.orderCode" placeholder="系统自动生成" :disabled="true"></a-input> |
| | | <j-input v-model="model.orderCode" placeholder="系统自动生成" :disabled="true"></j-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="报损时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lossTime"> |
| | | |
| | | <j-date placeholder="请选择报损时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.lossTime" |
| | | <j-date placeholder="请选择报损时间" :disabled="disableSubmit" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.lossTime" |
| | | style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | <a-form-model-item v-if="addShow" label="审核时间" :labelCol="labelCol" :wrapperCol="wrapperCol" |
| | | prop="approvalDate"> |
| | | |
| | | <j-date placeholder="请选择审核时间" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.approvalDate" |
| | | <j-date placeholder="请选择审核时间" :disabled="disableSubmit" date-format="YYYY-MM-DD HH:mm:ss" v-model="model.approvalDate" |
| | | style="width: 100%" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | </a-form-model> |
| | | </a-spin> |
| | | |
| | | <a-button type="primary" :style="{ marginBottom: '8px' }" @click="selectTools"> |
| | | <a-button type="primary" :style="{ marginBottom: '8px' }" :disabled="disableSubmit" @click="selectTools"> |
| | | 选择工具 |
| | | </a-button> |
| | | <a-table |
| | |
| | | width: 50 |
| | | }, |
| | | { |
| | | title: '刀具编号', |
| | | dataIndex: 'toolCode', |
| | | title: '刀具编码', |
| | | dataIndex: 'toolId', |
| | | align: 'center', |
| | | width: 150 |
| | | width: 200 |
| | | }, |
| | | |
| | | { |
| | |
| | | align: 'center', |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: '报损原因', |
| | | width: 150, |
| | | dataIndex: 'lossReason', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'lossReason' } |
| | | }, |
| | | |
| | | { |
| | | title: '报损数量', |
| | | dataIndex: 'lossNumber', |
| | | align: 'center', |
| | | width: 150, |
| | | scopedSlots: { customRender: 'lossNumber' } |
| | | }, |
| | | { |
| | | title: '中文名称', |
| | | dataIndex: 'chineseName', |
| | |
| | | dataIndex: 'goodsShelvesId', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '报损原因', |
| | | width: 150, |
| | | dataIndex: 'lossReason', |
| | | align: 'center', |
| | | scopedSlots: { customRender: 'lossReason' } |
| | | }, |
| | | |
| | | { |
| | | title: '报损数量', |
| | | dataIndex: 'lossNumber', |
| | | align: 'center', |
| | | width: 150, |
| | | scopedSlots: { customRender: 'lossNumber' } |
| | | }, |
| | | |
| | | { |
| | | title: '备注', |
| | |
| | | this.$bus.$on('selectionRows', (data) => { |
| | | for (let i = 0; i < data.length; i++) { |
| | | this.dataSource.push({ |
| | | toolId: data[i].id, |
| | | toolCode: data[i].toolCode, |
| | | toolCode:data[i].toolCode, |
| | | toolId:data[i].toolId, |
| | | classifyId: data[i].classifyId, |
| | | applicationType: data[i].applicationType_dictText, |
| | | chineseName: data[i].chineseName, |
| | |
| | | }, |
| | | add() { |
| | | this.addShow = false |
| | | this.edit() |
| | | this.edit({}) // 传入空对象作为默认值 |
| | | this.dataSource = [] |
| | | }, |
| | | edit(record) { |
| | | console.log(record) |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | getAction(this.url.list, { |
| | | lossBoundId: record.id, |
| | | pageNo: 1, |
| | | pageSize: 99999 |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | console.log(res.result.records) |
| | | this.dataSource = res.result.records |
| | | } else { |
| | | this.dataSource = null |
| | | } |
| | | }) |
| | | if (record && record.id) { |
| | | this.model = Object.assign({}, record) |
| | | this.visible = true |
| | | getAction(this.url.list, { |
| | | lossBoundId: record.id, |
| | | pageNo: 1, |
| | | pageSize: 99999 |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | console.log(res.result.records) |
| | | this.dataSource = res.result.records |
| | | } else { |
| | | this.dataSource = null |
| | | } |
| | | }) |
| | | } else { |
| | | this.model = {} // 如果是新增模式,则初始化 model |
| | | this.visible = true |
| | | this.dataSource = [] // 清空数据源 |
| | | } |
| | | }, |
| | | |
| | | |
| | | close() { |
| | | this.$emit('close') |
| | | this.addShow = true |