| | |
| | | </view> |
| | | <!-- 维修说明区域 --> |
| | | <view class="mt-2 flex justify-end"> |
| | | <wd-button type="success" style="margin: 20px" @click.stop="addSparePart()"> |
| | | <wd-button type="info" style="margin: 20px" @click.stop="addSparePart()"> |
| | | 添加备件 |
| | | </wd-button> |
| | | </view> |
| | | <view class="h-[2px] w-full bg-base"></view> |
| | | </wd-cell-group> |
| | | </wd-form> |
| | | <!-- <wd-button style="margin: 20px" block @click="handleClickRight">提交</wd-button>--> |
| | | <view class="h-[20px] w-full bg-base"></view> |
| | | <view class="h-[5px] w-full bg-base"></view> |
| | | <view class=" flex justify-around py-4"> |
| | | <wd-button block @click="saveOrder">保存</wd-button> |
| | | <wd-button type="success" block @click="submitOrder">提交</wd-button> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 备件选择弹出层 --> |
| | |
| | | .then((res: any) => { |
| | | resolve(true) |
| | | toastSucces() |
| | | uni.$emit('res-list-refresh') |
| | | uni.$emit('list-refresh') |
| | | uni.navigateBack() |
| | | }) |
| | | .catch((res) => { |
| | |
| | | function handleClickRight(data: any) { |
| | | message |
| | | .confirm({ |
| | | msg: '确定提交?', |
| | | msg: '确定' + (data.status === '3' ? '提交' : '保存') + '?', |
| | | title: '提示', |
| | | beforeConfirm: ({ resolve }) => { |
| | | hanldeUpdateRepairRes(data, resolve) |
| | |
| | | }) |
| | | } |
| | | |
| | | function submitOrder() { |
| | | const data = Object.assign({}, repairRes) |
| | | // 提交修改状态为完成 |
| | | data.status = '3' |
| | | // 设置维修完成时间 |
| | | data.endTime = formatDate(new Date()) |
| | | handleClickRight(data) |
| | | } |
| | | |
| | | function saveOrder() { |
| | | const data = Object.assign({}, repairRes) |
| | | // 仅保存不修改状态为完成 |
| | | data.status = '2' |
| | | // 仅保存不设置完成时间 |
| | | data.endTime = '' |
| | | handleClickRight(data) |
| | | } |
| | | |
| | | onNavigationBarButtonTap((e) => { |
| | | if (e.index === 0) { |
| | | // 管理员角色 |