|
@@ -1,25 +1,32 @@
|
|
<template>
|
|
<template>
|
|
<zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
|
|
<zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
|
|
- <template slot-scope="{activeKey, data}">
|
|
|
|
- <div :style="{
|
|
|
|
- width: '100%',
|
|
|
|
- height: activeKey == 'list' ? '100%' : '0px',
|
|
|
|
- overflow: 'hidden'
|
|
|
|
- }">
|
|
|
|
- <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
|
|
|
|
- :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
|
|
|
|
- :exportList="exportList" :operation="operation()">
|
|
|
|
|
|
+ <template slot-scope="{ activeKey, data }">
|
|
|
|
+ <div
|
|
|
|
+ :style="{
|
|
|
|
+ width: '100%',
|
|
|
|
+ height: activeKey == 'list' ? '100%' : '0px',
|
|
|
|
+ overflow: 'hidden'
|
|
|
|
+ }"
|
|
|
|
+ >
|
|
|
|
+ <template-page
|
|
|
|
+ ref="pageRef"
|
|
|
|
+ :get-list="getList"
|
|
|
|
+ :table-attributes="tableAttributes"
|
|
|
|
+ :table-events="tableEvents"
|
|
|
|
+ :options-evens-group="optionsEvensGroup"
|
|
|
|
+ :moreParameters="moreParameters"
|
|
|
|
+ :column-parsing="columnParsing"
|
|
|
|
+ :exportList="exportList"
|
|
|
|
+ :operation="operation()"
|
|
|
|
+ >
|
|
</template-page>
|
|
</template-page>
|
|
</div>
|
|
</div>
|
|
- <div v-if="~['add', 'detail'].indexOf(activeKey)" style="box-sizing: border-box;padding: 16px;">
|
|
|
|
|
|
+ <div v-if="~['add', 'detail'].indexOf(activeKey)" style="box-sizing: border-box; padding: 16px">
|
|
<div>
|
|
<div>
|
|
<zj-form-container ref="formRef" :form-data="formData">
|
|
<zj-form-container ref="formRef" :form-data="formData">
|
|
- <zj-form-module title="单据信息" :form-data="formData" :form-items="formItems">
|
|
|
|
- </zj-form-module>
|
|
|
|
- <zj-form-module title="客户信息" :form-data="formData" :form-items="basicInfo">
|
|
|
|
- </zj-form-module>
|
|
|
|
- <zj-form-module title="产品信息" :form-data="formData" :form-items="product">
|
|
|
|
- </zj-form-module>
|
|
|
|
|
|
+ <zj-form-module title="单据信息" :form-data="formData" :form-items="formItems"> </zj-form-module>
|
|
|
|
+ <zj-form-module title="客户信息" :form-data="formData" :form-items="basicInfo"> </zj-form-module>
|
|
|
|
+ <zj-form-module title="产品信息" :form-data="formData" :form-items="product"> </zj-form-module>
|
|
<zj-form-module title="负激励信息" label-width="120px" :form-data="formData" :form-items="pandanxinxi">
|
|
<zj-form-module title="负激励信息" label-width="120px" :form-data="formData" :form-items="pandanxinxi">
|
|
</zj-form-module>
|
|
</zj-form-module>
|
|
<zj-form-module title="正激励信息" label-width="120px" :form-data="formData" :form-items="czpandanxinxi">
|
|
<zj-form-module title="正激励信息" label-width="120px" :form-data="formData" :form-items="czpandanxinxi">
|
|
@@ -27,10 +34,20 @@
|
|
</zj-form-container>
|
|
</zj-form-container>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button size="mini" @click="data.removeTab">取 消</el-button>
|
|
<el-button size="mini" @click="data.removeTab">取 消</el-button>
|
|
- <el-button v-if="!formData.status || formData.status == 'SAVE'" size="mini" type="primary"
|
|
|
|
- @click="quedingbaocun(data.removeTab)">保存</el-button>
|
|
|
|
- <el-button v-if="formData.status == 'SAVE'" size="mini" type="primary"
|
|
|
|
- @click="quedingshenhe(data.removeTab)">审核</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="!formData.status || formData.status == 'SAVE'"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="quedingbaocun(data.removeTab)"
|
|
|
|
+ >保存</el-button
|
|
|
|
+ >
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="formData.status == 'SAVE'"
|
|
|
|
+ size="mini"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="quedingshenhe(data.removeTab)"
|
|
|
|
+ >审核</el-button
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -42,12 +59,19 @@
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
-import basicInfo from "./mixins/basicInfo"
|
|
|
|
-import productColumns from "./mixins/productColumns"
|
|
|
|
-import pandanxinxi from "./mixins/pandanxinxi"
|
|
|
|
-import czpandanxinxi from "./mixins/czpandanxinxi"
|
|
|
|
-import common_form from "./mixins/common_form"
|
|
|
|
-import { orderPunishList, orderPunishListExport, orderPunishExamine, orderPunishDelete, orderPunishDetail, orderPunishSave } from "@/api/penaltyWorkOrder";
|
|
|
|
|
|
+import basicInfo from './mixins/basicInfo'
|
|
|
|
+import productColumns from './mixins/productColumns'
|
|
|
|
+import pandanxinxi from './mixins/pandanxinxi'
|
|
|
|
+import czpandanxinxi from './mixins/czpandanxinxi'
|
|
|
|
+import common_form from './mixins/common_form'
|
|
|
|
+import {
|
|
|
|
+ orderPunishList,
|
|
|
|
+ orderPunishListExport,
|
|
|
|
+ orderPunishExamine,
|
|
|
|
+ orderPunishDelete,
|
|
|
|
+ orderPunishDetail,
|
|
|
|
+ orderPunishSave
|
|
|
|
+} from '@/api/penaltyWorkOrder'
|
|
export default {
|
|
export default {
|
|
components: { TemplatePage },
|
|
components: { TemplatePage },
|
|
mixins: [import_mixin, operation_mixin, basicInfo, productColumns, pandanxinxi, czpandanxinxi, common_form],
|
|
mixins: [import_mixin, operation_mixin, basicInfo, productColumns, pandanxinxi, czpandanxinxi, common_form],
|
|
@@ -65,56 +89,56 @@ export default {
|
|
// 勾选选中行
|
|
// 勾选选中行
|
|
recordSelected: [],
|
|
recordSelected: [],
|
|
formData: {
|
|
formData: {
|
|
- "address": "",
|
|
|
|
- "area": "",
|
|
|
|
- "areaId": "",
|
|
|
|
- "city": "",
|
|
|
|
- "cityId": "",
|
|
|
|
- "disposeOrderBaseId": "",
|
|
|
|
- "disposeOrderSmallType": "",
|
|
|
|
- "disposeOrderSmallTypeText": "",
|
|
|
|
- "disposeWebsitId": "",
|
|
|
|
- "disposeWebsitName": "",
|
|
|
|
- "disposeWorkerId": "",
|
|
|
|
- "disposeWorkerMobile": "",
|
|
|
|
- "disposeWorkerName": "",
|
|
|
|
- "examineBy": "",
|
|
|
|
- "examineRemark": "",
|
|
|
|
- "examineTime": "",
|
|
|
|
- "fileUrls": [],
|
|
|
|
- "id": "",
|
|
|
|
- "linkName": "",
|
|
|
|
- "orderBaseId": "",
|
|
|
|
- "orderSmallType": "",
|
|
|
|
- "orderSmallTypeText": "",
|
|
|
|
- "province": "",
|
|
|
|
- "provinceId": "",
|
|
|
|
- "punishOrderProducts": [
|
|
|
|
|
|
+ address: '',
|
|
|
|
+ area: '',
|
|
|
|
+ areaId: '',
|
|
|
|
+ city: '',
|
|
|
|
+ cityId: '',
|
|
|
|
+ disposeOrderBaseId: '',
|
|
|
|
+ disposeOrderSmallType: '',
|
|
|
|
+ disposeOrderSmallTypeText: '',
|
|
|
|
+ disposeWebsitId: '',
|
|
|
|
+ disposeWebsitName: '',
|
|
|
|
+ disposeWorkerId: '',
|
|
|
|
+ disposeWorkerMobile: '',
|
|
|
|
+ disposeWorkerName: '',
|
|
|
|
+ examineBy: '',
|
|
|
|
+ examineRemark: '',
|
|
|
|
+ examineTime: '',
|
|
|
|
+ fileUrls: [],
|
|
|
|
+ id: '',
|
|
|
|
+ linkName: '',
|
|
|
|
+ orderBaseId: '',
|
|
|
|
+ orderSmallType: '',
|
|
|
|
+ orderSmallTypeText: '',
|
|
|
|
+ province: '',
|
|
|
|
+ provinceId: '',
|
|
|
|
+ punishOrderProducts: [
|
|
{
|
|
{
|
|
- "brandId": "",
|
|
|
|
- "brandName": "",
|
|
|
|
- "insideCode": "",
|
|
|
|
- "mainId": "",
|
|
|
|
- "mainName": "",
|
|
|
|
- "outCode": "",
|
|
|
|
- "punishOrderId": "",
|
|
|
|
- "smallId": "",
|
|
|
|
- "smallName": "",
|
|
|
|
- "specsName": "",
|
|
|
|
|
|
+ brandId: '',
|
|
|
|
+ brandName: '',
|
|
|
|
+ insideCode: '',
|
|
|
|
+ mainId: '',
|
|
|
|
+ mainName: '',
|
|
|
|
+ outCode: '',
|
|
|
|
+ punishOrderId: '',
|
|
|
|
+ smallId: '',
|
|
|
|
+ smallName: '',
|
|
|
|
+ specsName: ''
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- "punishOrderWorkers": [],
|
|
|
|
- "remark": "",
|
|
|
|
|
|
+ punishOrderWorkers: [],
|
|
|
|
+ remark: '',
|
|
// "status": "",
|
|
// "status": "",
|
|
- "street": "",
|
|
|
|
- "streetId": "",
|
|
|
|
- "totalAmount": "",
|
|
|
|
- "userMobile": "",
|
|
|
|
- "userMobile2": "",
|
|
|
|
- "userName": "",
|
|
|
|
- "websitId": "",
|
|
|
|
- "websitName": "",
|
|
|
|
- },
|
|
|
|
|
|
+ street: '',
|
|
|
|
+ streetId: '',
|
|
|
|
+ totalAmount: '',
|
|
|
|
+ userMobile: '',
|
|
|
|
+ userMobile2: '',
|
|
|
|
+ userName: '',
|
|
|
|
+ websitId: '',
|
|
|
|
+ websitName: ''
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -131,11 +155,11 @@ export default {
|
|
click: () => {
|
|
click: () => {
|
|
this.$refs.tabPage.addTab({
|
|
this.$refs.tabPage.addTab({
|
|
// 对应显示的模块
|
|
// 对应显示的模块
|
|
- activeKey: "add",
|
|
|
|
|
|
+ activeKey: 'add',
|
|
// 唯一标识
|
|
// 唯一标识
|
|
- key: "add",
|
|
|
|
|
|
+ key: 'add',
|
|
// 页签名称
|
|
// 页签名称
|
|
- label: "新增",
|
|
|
|
|
|
+ label: '新增',
|
|
// 打开时事件
|
|
// 打开时事件
|
|
triggerEvent: () => {
|
|
triggerEvent: () => {
|
|
this.handleClose()
|
|
this.handleClose()
|
|
@@ -144,42 +168,42 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 关闭时事件
|
|
// 关闭时事件
|
|
- closeEvent: () => { }
|
|
|
|
|
|
+ closeEvent: () => {}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
]
|
|
]
|
|
]
|
|
]
|
|
]
|
|
]
|
|
- },
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.initFun()
|
|
this.initFun()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
initFun() {
|
|
initFun() {
|
|
- if (this.pageType == "detail") {
|
|
|
|
|
|
+ if (this.pageType == 'detail') {
|
|
this.$refs.tabPage.addTab({
|
|
this.$refs.tabPage.addTab({
|
|
// 对应显示的模块
|
|
// 对应显示的模块
|
|
- activeKey: "detail",
|
|
|
|
|
|
+ activeKey: 'detail',
|
|
// 唯一标识
|
|
// 唯一标识
|
|
- key: "detail",
|
|
|
|
|
|
+ key: 'detail',
|
|
// 页签名称
|
|
// 页签名称
|
|
- label: "详情",
|
|
|
|
|
|
+ label: '详情',
|
|
// 打开时事件
|
|
// 打开时事件
|
|
triggerEvent: () => {
|
|
triggerEvent: () => {
|
|
this.handleClose()
|
|
this.handleClose()
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
orderPunishDetail({ id: this.pageCode }).then(res => {
|
|
orderPunishDetail({ id: this.pageCode }).then(res => {
|
|
Object.assign(this.formData, res.data, {
|
|
Object.assign(this.formData, res.data, {
|
|
- fileUrls: res.data.fileUrls ? res.data.fileUrls.split(",").map(url => ({ url })) : []
|
|
|
|
|
|
+ fileUrls: res.data.fileUrls ? res.data.fileUrls.split(',').map(url => ({ url })) : []
|
|
})
|
|
})
|
|
this.openForm()
|
|
this.openForm()
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 关闭时事件
|
|
// 关闭时事件
|
|
- closeEvent: () => { }
|
|
|
|
|
|
+ closeEvent: () => {}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -214,7 +238,7 @@ export default {
|
|
if (valid) {
|
|
if (valid) {
|
|
orderPunishSave({
|
|
orderPunishSave({
|
|
...this.formData,
|
|
...this.formData,
|
|
- fileUrls: this.formData.fileUrls.map(item => item.url).join(",")
|
|
|
|
|
|
+ fileUrls: this.formData.fileUrls.map(item => item.url).join(',')
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.$message({
|
|
this.$message({
|
|
type: 'success',
|
|
type: 'success',
|
|
@@ -231,7 +255,7 @@ export default {
|
|
quedingshenhe(removeTab) {
|
|
quedingshenhe(removeTab) {
|
|
orderPunishExamine({
|
|
orderPunishExamine({
|
|
id: this.formData.id,
|
|
id: this.formData.id,
|
|
- status: "OK",
|
|
|
|
|
|
+ status: 'OK'
|
|
}).then(res => {
|
|
}).then(res => {
|
|
this.$message({
|
|
this.$message({
|
|
type: 'success',
|
|
type: 'success',
|
|
@@ -249,32 +273,32 @@ export default {
|
|
click: ({ row, index, column }) => {
|
|
click: ({ row, index, column }) => {
|
|
this.$refs.tabPage.addTab({
|
|
this.$refs.tabPage.addTab({
|
|
// 对应显示的模块
|
|
// 对应显示的模块
|
|
- activeKey: "detail",
|
|
|
|
|
|
+ activeKey: 'detail',
|
|
// 唯一标识
|
|
// 唯一标识
|
|
- key: "detail",
|
|
|
|
|
|
+ key: 'detail',
|
|
// 页签名称
|
|
// 页签名称
|
|
- label: "详情",
|
|
|
|
|
|
+ label: '详情',
|
|
// 打开时事件
|
|
// 打开时事件
|
|
triggerEvent: () => {
|
|
triggerEvent: () => {
|
|
this.handleClose()
|
|
this.handleClose()
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
orderPunishDetail({ id: row.id }).then(res => {
|
|
orderPunishDetail({ id: row.id }).then(res => {
|
|
Object.assign(this.formData, res.data, {
|
|
Object.assign(this.formData, res.data, {
|
|
- fileUrls: res.data.fileUrls ? res.data.fileUrls.split(",").map(url => ({ url })) : []
|
|
|
|
|
|
+ fileUrls: res.data.fileUrls ? res.data.fileUrls.split(',').map(url => ({ url })) : []
|
|
})
|
|
})
|
|
this.openForm()
|
|
this.openForm()
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 关闭时事件
|
|
// 关闭时事件
|
|
- closeEvent: () => { }
|
|
|
|
|
|
+ closeEvent: () => {}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
del: {
|
|
del: {
|
|
- prompt: "是否确定删除?",
|
|
|
|
|
|
+ prompt: '是否确定删除?',
|
|
conditions: ({ row, index, column }) => {
|
|
conditions: ({ row, index, column }) => {
|
|
- return row.status != "OK"
|
|
|
|
|
|
+ return row.status != 'OK'
|
|
},
|
|
},
|
|
click: ({ row, index, column }) => {
|
|
click: ({ row, index, column }) => {
|
|
orderPunishDelete({ id: row.id }).then(res => {
|
|
orderPunishDelete({ id: row.id }).then(res => {
|
|
@@ -287,7 +311,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- },
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|