|
@@ -12,6 +12,7 @@ import ImageUpload from '@/components/file-upload'
|
|
import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
|
|
import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
|
|
import { del, getMainList, getTypeList } from "@/api/workOrder/settlementStandardInstall";
|
|
import { del, getMainList, getTypeList } from "@/api/workOrder/settlementStandardInstall";
|
|
import { listPageV2, pageExport, add, edit } from "@/api/workOrder/settlementStandardRepair";
|
|
import { listPageV2, pageExport, add, edit } from "@/api/workOrder/settlementStandardRepair";
|
|
|
|
+import { getSourceList } from "@/api/workOrder/settlementStandardInstall";
|
|
import { thousands } from '@/utils/common'
|
|
import { thousands } from '@/utils/common'
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
import operation_mixin from '@/components/template/operation_mixin.js'
|
|
export default {
|
|
export default {
|
|
@@ -40,7 +41,8 @@ export default {
|
|
editIndex: null,
|
|
editIndex: null,
|
|
mainList: [],
|
|
mainList: [],
|
|
smallList: [],
|
|
smallList: [],
|
|
- typeList: []
|
|
|
|
|
|
+ typeList: [],
|
|
|
|
+ sourceList: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -67,6 +69,7 @@ export default {
|
|
created() {
|
|
created() {
|
|
this.getMainList()
|
|
this.getMainList()
|
|
this.getTypeList()
|
|
this.getTypeList()
|
|
|
|
+ this.getSourceList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 列表请求函数
|
|
// 列表请求函数
|
|
@@ -84,6 +87,27 @@ export default {
|
|
exportList: pageExport,
|
|
exportList: pageExport,
|
|
// 表格列解析渲染数据更改
|
|
// 表格列解析渲染数据更改
|
|
columnParsing(item, defaultData) {
|
|
columnParsing(item, defaultData) {
|
|
|
|
+ if (item.jname === 'orderChannelText') {
|
|
|
|
+ defaultData.render = (h, { row, index, column }) => {
|
|
|
|
+ return this.editIndex == index ? (
|
|
|
|
+ <div class="redbordererr">
|
|
|
|
+ <el-form-item prop={`tableData.${index}.orderChannelId`} rules={[{ required: true, message: '工单来源不能为空', trigger: 'blur' }]}>
|
|
|
|
+ <el-select value={{ dictCode: row.orderChannelId, dictValue: row.orderChannelText }} value-key="dictCode" placeholder="请选择"
|
|
|
|
+ onInput={(val) => {
|
|
|
|
+ row.orderChannelText = val.dictValue
|
|
|
|
+ row.orderChannelId = val.dictCode
|
|
|
|
+ }}>
|
|
|
|
+ {
|
|
|
|
+ this.sourceList.map((item, index) => {
|
|
|
|
+ return <el-option key={item.dictCode} label={item.dictValue} value={item}></el-option>
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
|
|
+ ) : (<div style="padding: 6px;">{row.orderChannelText}</div>)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (item.jname === 'typeName') {
|
|
if (item.jname === 'typeName') {
|
|
defaultData.render = (h, { row, index, column }) => {
|
|
defaultData.render = (h, { row, index, column }) => {
|
|
return this.editIndex == index ? (
|
|
return this.editIndex == index ? (
|
|
@@ -306,6 +330,11 @@ export default {
|
|
this.typeList = res.data.records
|
|
this.typeList = res.data.records
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ getSourceList(){
|
|
|
|
+ getSourceList({ pageNum: 1, pageSize: -1, params: [{param: "a.dict_type", compare: "=", value: "ORDER_CHANNEL"}] }).then(res => {
|
|
|
|
+ this.sourceList = [...[{ dictValue: '通用', dictCode: '0' }], ...res.data.records]
|
|
|
|
+ })
|
|
|
|
+ },
|
|
addData() {
|
|
addData() {
|
|
this.$refs.pageRef.tableForm().validate((valid) => {
|
|
this.$refs.pageRef.tableForm().validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
@@ -313,6 +342,8 @@ export default {
|
|
this.$refs.pageRef.insertionData(0, {
|
|
this.$refs.pageRef.insertionData(0, {
|
|
companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
|
|
companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
|
|
settleNormType: 'REPAIR',
|
|
settleNormType: 'REPAIR',
|
|
|
|
+ orderChannelText: '',
|
|
|
|
+ orderChannelId: '',
|
|
typeName: '',
|
|
typeName: '',
|
|
type: '',
|
|
type: '',
|
|
categoryName: '',
|
|
categoryName: '',
|
|
@@ -336,6 +367,8 @@ export default {
|
|
add(row) {
|
|
add(row) {
|
|
add({
|
|
add({
|
|
settleNormType: 'REPAIR',
|
|
settleNormType: 'REPAIR',
|
|
|
|
+ orderChannelText: row.orderChannelText,
|
|
|
|
+ orderChannelId: row.orderChannelId,
|
|
typeName: row.typeName,
|
|
typeName: row.typeName,
|
|
type: row.type,
|
|
type: row.type,
|
|
parentCategoryName: row.parentCategoryName,
|
|
parentCategoryName: row.parentCategoryName,
|
|
@@ -358,6 +391,8 @@ export default {
|
|
edit({
|
|
edit({
|
|
id: row.id,
|
|
id: row.id,
|
|
settleNormType: 'REPAIR',
|
|
settleNormType: 'REPAIR',
|
|
|
|
+ orderChannelText: row.orderChannelText,
|
|
|
|
+ orderChannelId: row.orderChannelId,
|
|
typeName: row.typeName,
|
|
typeName: row.typeName,
|
|
type: row.type,
|
|
type: row.type,
|
|
parentCategoryName: row.parentCategoryName,
|
|
parentCategoryName: row.parentCategoryName,
|