|
@@ -7,7 +7,7 @@
|
|
|
<!-- 创建工单 -->
|
|
|
<div class="cartographer_big">
|
|
|
<el-dialog title="创建工单" width="100%" :modal="false" :visible.sync="createFormBool" :before-close="handleClose">
|
|
|
- <workOrderInfo :workOrderType="workOrderType" v-if="createFormBool" />
|
|
|
+ <workOrderInfo :workOrderType="workOrderType" v-if="createFormBool" :cloneWorkOrder="cloneWorkOrder"/>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
<!-- 工单详情 -->
|
|
@@ -80,7 +80,8 @@ export default {
|
|
|
orderTypeList: [],
|
|
|
orderStatusList: [],
|
|
|
defaultSearchData: [],
|
|
|
- workOrderType: 1
|
|
|
+ workOrderType: 1,
|
|
|
+ cloneWorkOrder: null
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -199,6 +200,17 @@ export default {
|
|
|
EventBus.$on('handleOrderClone', () => {
|
|
|
this.handleClose()
|
|
|
})
|
|
|
+ EventBus.$on('cloneWorkOrder', (data) => {
|
|
|
+ this.handleClose(()=>{
|
|
|
+ console.log(data,"999999999")
|
|
|
+ this.cloneWorkOrder = data
|
|
|
+ this.workOrderType = data.saleType
|
|
|
+ this.createFormBool = false
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.createFormBool = true
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
// 获取工单类型
|
|
|
listPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.status", "compare": "=", "value": "true" }] }).then(res => {
|
|
|
this.orderTypeList = res.data.records.map(item => ({
|
|
@@ -335,7 +347,7 @@ export default {
|
|
|
edit: {
|
|
|
click: ({ row, index, column }) => {
|
|
|
this.id = row.id
|
|
|
- this.workOrderType = Number(Object.entries(row.selectMapData.saleType).find(([key, val]) => val == row.saleType)?.[0] || 1)
|
|
|
+ this.workOrderType = Number(Object.entries(row?.selectMapData?.saleType||{}).find(([key, val]) => val == row.saleType)?.[0] || 1)
|
|
|
this.$nextTick(() => {
|
|
|
this.detailFormBool = true
|
|
|
})
|
|
@@ -344,17 +356,21 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- handleClose() {
|
|
|
+ handleClose(cb) {
|
|
|
this.$router.push({
|
|
|
name: "workOrderPool",
|
|
|
params: {},
|
|
|
query: {}
|
|
|
})
|
|
|
this.$nextTick(() => {
|
|
|
+ this.cloneWorkOrder = null
|
|
|
this.createFormBool = false
|
|
|
this.detailFormBool = false
|
|
|
this.recordSelected = []
|
|
|
this.$refs?.pageRef?.refreshList()
|
|
|
+ if(cb && typeof cb === 'function'){
|
|
|
+ cb()
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
|