| | |
| | | :value="text" |
| | | :read-only="true" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | :disabled="repairOrderStatus=='4'" |
| | | /> |
| | | <a-input-number |
| | | :value="text" |
| | |
| | | :min="0" |
| | | :max="99999" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="record.disabled" |
| | | :disabled="repairOrderStatus=='4'" |
| | | /> |
| | | |
| | | </div> |
| | |
| | | slot='action' |
| | | slot-scope='text, record,index' |
| | | > |
| | | <a @click="handleDeleteFake(index)" v-if="record.isLock=='no'&&mainId.status=='3'">删除</a> |
| | | <a |
| | | :disabled="repairOrderStatus=='4'" |
| | | @click="handleDelete(index)" |
| | | >删除</a> |
| | | </span> |
| | | </a-table> |
| | | <a-button |
| | |
| | | type="dashed" |
| | | icon="plus" |
| | | @click="addHour" |
| | | :disabled="mainId.status=='4'" |
| | | :disabled="this.repairOrderStatus=='4' || this.repairOrderStatus=='2'" |
| | | >添加实际工时 |
| | | <!-- :disabled="mainId.status=='4'" --> |
| | | </a-button> |
| | | <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :style="{textAlign:'right'}"> |
| | |
| | | @click="handleOk(1)" |
| | | type="primary" |
| | | :style="{marginRight: '8px'}" |
| | | :disabled="mainId.status=='4'" |
| | | :disabled="this.repairOrderStatus=='4' || this.repairOrderStatus=='2'" |
| | | >暂存</a-button> |
| | | <a-button |
| | | @click="handleOk(0)" |
| | | type="primary" |
| | | :disabled="mainId.status=='4'" |
| | | :disabled="this.repairOrderStatus=='4' || this.repairOrderStatus=='2'" |
| | | >保存</a-button> |
| | | </a-row> |
| | | <!-- :disabled="false" --> |
| | |
| | | JEllipsis, |
| | | ActualHourUserSelect |
| | | }, |
| | | // props: { |
| | | // mainId: { |
| | | // type: Object, |
| | | // required: false, |
| | | // default: {} |
| | | // } |
| | | // }, |
| | | props: { |
| | | mainId: { |
| | | type: Object, |
| | | } |
| | | repairOrderId: { |
| | | type: String, |
| | | required: false, |
| | | default: '-1' |
| | | }, |
| | | repairOrderStatus: { |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | }, |
| | | teamId: { |
| | | type: String, |
| | | required: false, |
| | | default: '' |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: "center", |
| | | customRender: function (t, r, index) { |
| | | return parseInt(index) + 1; |
| | | } |
| | | }, |
| | | { |
| | | title: '*人员编码', |
| | | dataIndex: 'username', |
| | | align: "center", |
| | |
| | | changeIndex: 0 |
| | | } |
| | | }, |
| | | created() { |
| | | // this.queryParam['maintenanceOrderId'] = this.dailyMaintenanceOrderId; |
| | | // this.queryParam['equipmentId'] = this.equipmentId |
| | | // this.loadData(1); |
| | | }, |
| | | |
| | | watch: { |
| | | mainId: { |
| | | repairOrderId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | console.log(val) |
| | | if (!this.mainId.id) { |
| | | |
| | | this.clearList() |
| | | } else { |
| | | |
| | | this.queryParam['repairOrderId'] = val.id |
| | | this.loadData(1) |
| | | } |
| | | this.clearList(); |
| | | this.queryParam['repairOrderId'] = val |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | addHour() { |
| | | this.dataSource.push({ userId: '', repairOrderId: this.mainId.id, actualHour: 0, username: '', realname: '' }) |
| | | this.dataSource.push({ userId: '', repairOrderId: this.repairOrderId, actualHour: 0, username: '', realname: '' }) |
| | | }, |
| | | handleCancel() { |
| | | this.$bus.$emit('closeDrawer'); |
| | |
| | | this.disableSubmit = false; |
| | | this.visible = false; |
| | | }, |
| | | handleDeleteFake(index) { |
| | | this.dataSource.pop(index); |
| | | handleDelete(text, record, index) { |
| | | this.dataSource.splice(index, 1); |
| | | }, |
| | | |
| | | handleOk(saveStatus) { |
| | | const that = this |
| | | if (saveStatus == 0) { |
| | |
| | | if (!err) { |
| | | that.confirmLoading = true |
| | | let formData = {} |
| | | formData.repairOrderId = that.mainId.id; |
| | | // formData.repairOrderId = that.mainId.id; |
| | | formData.repairOrderId = that.repairOrderId; |
| | | formData.repairOrderActualWorkHoursList = that.dataSource; |
| | | formData.equipmentId = that.equipmentId; |
| | | // formData.equipmentId = that.equipmentId; |
| | | let obj = obj = postAction(this.url.confirmHour, formData) |
| | | obj.then((res) => { |
| | | if (res.success) { |
| | |
| | | }, |
| | | onSearchUser(index) { |
| | | this.recordIndex = index |
| | | this.$refs.actualUserSelect.list(this.mainId.teamId) |
| | | // this.$refs.actualUserSelect.list(this.mainId.teamId) |
| | | this.$refs.actualUserSelect.list(this.teamId) |
| | | this.$refs.actualUserSelect.title = '人员选择' |
| | | }, |
| | | sendUserRecord(data, val) { |