|
@@ -20,7 +20,7 @@ import { required, mobileRequired, mobile, httpUrl, email } from '@/components/t
|
|
|
import { listPageV2 } from "@/api/workOrder/settlementStandardInstall";
|
|
|
import { listPageV2 as listPageV2Repair } from "@/api/workOrder/settlementStandardRepair";
|
|
|
import { listPageV2 as listPageV2Other } from "@/api/workOrder/settlementStandardOther";
|
|
|
-import { orderBaseSettleNormDetail, orderBaseSettleNormConfirm } from "@/api/workOrderPool.js";
|
|
|
+import { orderBaseSettleNormDetail, orderBaseSettleNormConfirm, settleNormInstallQuery, settleNormOtherQuery } from "@/api/workOrderPool.js";
|
|
|
import { EventBus } from '@/utils/eventBus'
|
|
|
export default {
|
|
|
props: {
|
|
@@ -45,13 +45,43 @@ export default {
|
|
|
return [
|
|
|
{
|
|
|
columnAttributes: {
|
|
|
+ label: '产品品牌',
|
|
|
+ prop: 'brand'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '产品大类',
|
|
|
+ prop: 'mainName'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '产品小类',
|
|
|
+ prop: 'smallName'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '产品机型',
|
|
|
+ prop: 'goodsName'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '数量',
|
|
|
+ prop: 'orderNum'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnAttributes: {
|
|
|
label: '工单类型',
|
|
|
prop: 'typeName'
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
columnAttributes: {
|
|
|
- label: '产品大类',
|
|
|
+ label: '结算产品大类',
|
|
|
prop: 'parentCategoryId'
|
|
|
},
|
|
|
render: (h, { row, column, index }) => {
|
|
@@ -85,7 +115,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
columnAttributes: {
|
|
|
- label: '产品小类',
|
|
|
+ label: '结算产品小类',
|
|
|
prop: 'categoryId'
|
|
|
},
|
|
|
render: (h, { row, column, index }) => {
|
|
@@ -109,24 +139,18 @@ export default {
|
|
|
}
|
|
|
}}
|
|
|
placeholder="请选择">
|
|
|
- {this.classifyListLv2.filter(item => item.parentId === row.parentCategoryId).map((item, index_) => <el-option key={index_} label={item.name} value={item.categoryId}></el-option>)}
|
|
|
+ {this.classifyListLv2.filter(item => item.parentCategoryId === row.parentCategoryId).map((item, index_) => <el-option key={index_} label={item.name} value={item.categoryId}></el-option>)}
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
}
|
|
|
},
|
|
|
- {
|
|
|
- columnAttributes: {
|
|
|
- label: '机型',
|
|
|
- prop: 'goodsName'
|
|
|
- },
|
|
|
- },
|
|
|
...(() => {
|
|
|
if (this.formData.orderType == 'INSTALL') {
|
|
|
return [
|
|
|
{
|
|
|
columnAttributes: {
|
|
|
- label: '功率',
|
|
|
+ label: '结算功率',
|
|
|
prop: 'label'
|
|
|
},
|
|
|
render: (h, { row, column, index }) => {
|
|
@@ -162,7 +186,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
columnAttributes: {
|
|
|
- label: '数量',
|
|
|
+ label: '结算数量',
|
|
|
prop: 'settleNum'
|
|
|
},
|
|
|
render: (h, { row, column, index }) => {
|
|
@@ -536,6 +560,43 @@ export default {
|
|
|
this.gonglr = res.data.records
|
|
|
})
|
|
|
}
|
|
|
+ settleNormInstallQuery({
|
|
|
+ settleNormType: this.formData.orderType,
|
|
|
+ type: this.formData.orderSmallType
|
|
|
+ }).then(res => {
|
|
|
+ var classifyList = {}
|
|
|
+ this.classifyListLv2 = res.data.map(item => {
|
|
|
+ var { children, ...data } = item
|
|
|
+ classifyList[data.parentCategoryId] = data.parentCategoryName
|
|
|
+ return {
|
|
|
+ name: data.categoryName,
|
|
|
+ ...data
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.classifyList = Object.keys(classifyList).map(key => ({
|
|
|
+ name: classifyList[key],
|
|
|
+ categoryId: key
|
|
|
+ }))
|
|
|
+ })
|
|
|
+ // // 获取产品大类小类
|
|
|
+ // getClassifyList({ type: 2, status: true }).then(res => {
|
|
|
+ // var classifyListLv2 = []
|
|
|
+ // this.classifyList = res.data.map(item => {
|
|
|
+ // var { children, ...data } = item
|
|
|
+ // classifyListLv2.push(...(children || []))
|
|
|
+ // return {
|
|
|
+ // ...data
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // this.classifyListLv2 = classifyListLv2
|
|
|
+ // })
|
|
|
+ settleNormOtherQuery().then(res => {
|
|
|
+ this.gongqt = res.data;
|
|
|
+ this.gongqtdl = Array.from(new Set(res.data.map(item => item.type))).map(type => ({
|
|
|
+ label: type,
|
|
|
+ value: type
|
|
|
+ }));
|
|
|
+ })
|
|
|
})
|
|
|
}
|
|
|
},
|
|
@@ -543,28 +604,6 @@ export default {
|
|
|
immediate: true,
|
|
|
},
|
|
|
},
|
|
|
- created() {
|
|
|
- // 获取产品大类小类
|
|
|
- getClassifyList({ type: 2, status: true }).then(res => {
|
|
|
- var classifyListLv2 = []
|
|
|
- this.classifyList = res.data.map(item => {
|
|
|
- var { children, ...data } = item
|
|
|
- classifyListLv2.push(...(children || []))
|
|
|
- return {
|
|
|
- ...data
|
|
|
- }
|
|
|
- });
|
|
|
- this.classifyListLv2 = classifyListLv2
|
|
|
- })
|
|
|
- // 其他类型
|
|
|
- listPageV2Other({ "pageNum": 1, "pageSize": -1, "params": [] }).then(res => {
|
|
|
- this.gongqt = res.data.records
|
|
|
- this.gongqtdl = Array.from(new Set(res.data.records.map(item => item.type))).map(type => ({
|
|
|
- label: type,
|
|
|
- value: type
|
|
|
- }))
|
|
|
- })
|
|
|
- },
|
|
|
methods: {
|
|
|
getflList(list = [], row = {},) {
|
|
|
return list.filter(item => (
|