lshcom 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/assets/css/global.scss +105 -0
- package/src/components/LshVehicle/index.vue +4 -0
- package/src/components/el/Select.vue +24 -2
- package/src/components/el/Table.vue +33 -4
- package/src/components/iris-card-modal/ApplicableProduct.vue +306 -0
- package/src/components/iris-card-modal/BatchProductRef.vue +63 -0
- package/src/components/lsh-vehicle/index.vue +5 -2
- package/src/components/portrayal/portrayal.vue +2 -1
- package/src/components/table/index.vue +14 -0
- package/src/components/tabletwo/index.vue +17 -0
package/package.json
CHANGED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
|
|
2
|
+
.container-fluid .el-button--primary:hover {
|
|
3
|
+
background-color: #4067a2;
|
|
4
|
+
border-color: #4067a2;
|
|
5
|
+
}
|
|
6
|
+
.container-fluid .el-button--success:hover {
|
|
7
|
+
background-color: #4b995b;
|
|
8
|
+
border-color: #4b995b;
|
|
9
|
+
}
|
|
10
|
+
.container-fluid .el-button--danger:hover {
|
|
11
|
+
background-color: #ff2b05;
|
|
12
|
+
border-color: #ff2b05;
|
|
13
|
+
}
|
|
14
|
+
.container-fluid .el-button--warning:hover {
|
|
15
|
+
background-color: #e68e07;
|
|
16
|
+
border-color: #e68e07;
|
|
17
|
+
}
|
|
18
|
+
.el-button {
|
|
19
|
+
padding: 4px 12px !important;
|
|
20
|
+
line-height: 1.5 !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
.el-button--text.is-disabled, .el-button--text.is-disabled:focus, .el-button--text.is-disabled:hover {
|
|
25
|
+
background-color: transparent !important;
|
|
26
|
+
border-color: transparent !important;
|
|
27
|
+
}
|
|
28
|
+
.el-button--text:focus{outline: none;}
|
|
29
|
+
.el-message-box{
|
|
30
|
+
.el-message-box__title{height:auto;min-height:18px;}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.f-fr{float:right}
|
|
34
|
+
.f-ib{display:inline-block !important}
|
|
35
|
+
.f-dn{display:none}
|
|
36
|
+
.f-db{display:block !important}
|
|
37
|
+
.f-pr{position:relative}
|
|
38
|
+
.f-pa{position:absolute}
|
|
39
|
+
.f-oh{overflow:hidden}
|
|
40
|
+
.f-oa{overflow-y:auto}
|
|
41
|
+
.f-ov{overflow:visible !important}
|
|
42
|
+
.f-w1{width:100%}
|
|
43
|
+
.f-wa{width:auto !important}
|
|
44
|
+
.f-maw1{max-width:100%;}
|
|
45
|
+
.f-h1{height:100%}
|
|
46
|
+
.f-mh1{min-height:100%}
|
|
47
|
+
.f-fwn{font-weight:normal}
|
|
48
|
+
.f-fwb{font-weight:bold}
|
|
49
|
+
.f-tal{text-align:left}
|
|
50
|
+
.f-tac{text-align:center}
|
|
51
|
+
.f-tar{text-align:right}
|
|
52
|
+
.f-taj{text-align:justify;text-justify:inter-ideograph}
|
|
53
|
+
.f-vam,.f-vama *{vertical-align:middle}
|
|
54
|
+
.f-wsn{word-wrap:normal;white-space:nowrap;}
|
|
55
|
+
.f-wsp{white-space:pre}
|
|
56
|
+
.f-wspw{white-space:pre-wrap}
|
|
57
|
+
.f-pre{overflow:hidden;text-align:left;white-space:pre-wrap;word-wrap:break-word;word-break:break-all;}
|
|
58
|
+
.f-wwb{white-space:normal;word-wrap:break-word;word-break:break-all;}
|
|
59
|
+
.f-ti2{text-indent:2em}
|
|
60
|
+
.f-lh2{line-height:2em}
|
|
61
|
+
.f-tdu,.f-tdu:hover{text-decoration:underline}
|
|
62
|
+
.f-tdn,.f-tdn:hover{text-decoration:none}
|
|
63
|
+
.f-toe{overflow:hidden;word-wrap:normal;white-space:nowrap;text-overflow:ellipsis;}
|
|
64
|
+
.f-toe2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;}
|
|
65
|
+
.f-b1d{border:1px solid #ddd}
|
|
66
|
+
.f-cp{cursor:pointer}
|
|
67
|
+
.f-c0{color:#000}
|
|
68
|
+
.f-c3{color:#333}
|
|
69
|
+
.f-c6{color:#666}
|
|
70
|
+
.f-c9{color:#999}
|
|
71
|
+
.f-cb{color:blue}
|
|
72
|
+
.f-cr{color:red}
|
|
73
|
+
.f-cf{color:#fff}
|
|
74
|
+
.f-bgf{background:#fff}
|
|
75
|
+
.f-bgf2{background:#f2f2f2}
|
|
76
|
+
.f-br0{border-radius:0}
|
|
77
|
+
.f-br5{border-radius:5px}
|
|
78
|
+
.f-br10{border-radius:10px}
|
|
79
|
+
.f-br20{border-radius:20px}
|
|
80
|
+
.f-bs{box-shadow: 0 0 5px #ccc}
|
|
81
|
+
.f-df{display:flex}
|
|
82
|
+
.f-fdc{flex-direction:column}
|
|
83
|
+
.f-aic{align-items:center}
|
|
84
|
+
.f-jcsb{justify-content:space-between}
|
|
85
|
+
.f-f1{flex:1}
|
|
86
|
+
// 字号
|
|
87
|
+
@for $i from 6 through 12 {
|
|
88
|
+
.f-fs#{$i*2} { font-size: #{$i*2}px }
|
|
89
|
+
}
|
|
90
|
+
// 边距 填充
|
|
91
|
+
@for $i from 1 through 4 {
|
|
92
|
+
.f-m#{$i*5} { margin: #{$i*5}px }
|
|
93
|
+
.f-mt#{$i*5} { margin-top: #{$i*5}px }
|
|
94
|
+
.f-mr#{$i*5} { margin-right: #{$i*5}px }
|
|
95
|
+
.f-mb#{$i*5} { margin-bottom: #{$i*5}px }
|
|
96
|
+
.f-ml#{$i*5} { margin-left: #{$i*5}px }
|
|
97
|
+
.f-p#{$i*5} { padding: #{$i*5}px }
|
|
98
|
+
.f-pt#{$i*5} { padding-top: #{$i*5}px }
|
|
99
|
+
.f-pr#{$i*5} { padding-right: #{$i*5}px }
|
|
100
|
+
.f-pb#{$i*5} { padding-bottom: #{$i*5}px }
|
|
101
|
+
.f-pl#{$i*5} { padding-left: #{$i*5}px }
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.u-ti{display:flex;align-items:center;justify-content:space-between}
|
|
105
|
+
.u-center{display:flex;align-items:center;justify-content:center}
|
|
@@ -407,6 +407,7 @@ export default {
|
|
|
407
407
|
],
|
|
408
408
|
_relation: {},
|
|
409
409
|
frameNo_ls: "",
|
|
410
|
+
bm6: '',
|
|
410
411
|
};
|
|
411
412
|
},
|
|
412
413
|
watch: {
|
|
@@ -962,6 +963,9 @@ export default {
|
|
|
962
963
|
label: `${item.displayName}---&---${item.carModelCode}`,
|
|
963
964
|
}
|
|
964
965
|
})
|
|
966
|
+
if(obj.list && obj.list.length){
|
|
967
|
+
this.bm6 = obj.list[0].carModelCode.slice(0,6)
|
|
968
|
+
}
|
|
965
969
|
})
|
|
966
970
|
},
|
|
967
971
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<el-option
|
|
21
21
|
v-for="(item,index) in selectOptions"
|
|
22
22
|
:key="item.id || index"
|
|
23
|
-
:label="item[optionLabel]"
|
|
23
|
+
:label="optionLabel ? item[optionLabel] : item"
|
|
24
24
|
:value="optionValue ? item[optionValue] : item"
|
|
25
25
|
:disabled="item.disabled">
|
|
26
26
|
<slot :item="item"></slot>
|
|
@@ -67,6 +67,10 @@
|
|
|
67
67
|
watch: {
|
|
68
68
|
value: function (val, oldVal) {
|
|
69
69
|
this.selectValue = val
|
|
70
|
+
if(this.selectValue.length && !this.selectOptions.length){
|
|
71
|
+
this.resetData()
|
|
72
|
+
this.getData()
|
|
73
|
+
}
|
|
70
74
|
},
|
|
71
75
|
options: function (val, oldVal) {
|
|
72
76
|
this.selectOptions = []
|
|
@@ -105,7 +109,7 @@
|
|
|
105
109
|
return
|
|
106
110
|
} else if(value.length === 2 && value[0] === this.selectAllValue) {
|
|
107
111
|
value.splice(0, 1)
|
|
108
|
-
} else if(value.includes(this.selectAllValue)) {
|
|
112
|
+
} else if(value.includes(this.selectAllValue) || value.length == this.selectOptions.length - 1) {
|
|
109
113
|
value = [this.selectAllValue]
|
|
110
114
|
} else {
|
|
111
115
|
this.$emit('change', value)
|
|
@@ -132,6 +136,12 @@
|
|
|
132
136
|
this.firstGetData = false
|
|
133
137
|
if (obj.list.length < this.pageNums) this.nomore = true
|
|
134
138
|
this.selectOptions = this.selectOptions.concat(obj.list)
|
|
139
|
+
// 全选交互
|
|
140
|
+
if(this.multiple && this.selectAllable){
|
|
141
|
+
if(this.selectValue.includes(this.selectAllValue) || this.selectValue.length == this.selectOptions.length - 1) {
|
|
142
|
+
this.selectValue = [this.selectAllValue]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
135
145
|
this.$emit('getData', this.selectOptions)
|
|
136
146
|
})
|
|
137
147
|
}
|
|
@@ -186,6 +196,18 @@
|
|
|
186
196
|
this.selectOptions.unshift({[this.optionLabel]: this.selectAllLable, [this.optionValue]: this.selectAllValue})
|
|
187
197
|
}
|
|
188
198
|
},
|
|
199
|
+
// 获取选中项
|
|
200
|
+
getSelect(){
|
|
201
|
+
if(this.multiple){
|
|
202
|
+
return this.selectOptions.filter(item => this.selectValue.includes(item[this.optionValue]))
|
|
203
|
+
} else {
|
|
204
|
+
let obj = {}
|
|
205
|
+
if(this.selectValue && this.selectOptions.length){
|
|
206
|
+
obj = this.selectOptions.filter(item => item[this.optionValue] == this.selectValue)[0] || {}
|
|
207
|
+
}
|
|
208
|
+
return obj
|
|
209
|
+
}
|
|
210
|
+
},
|
|
189
211
|
},
|
|
190
212
|
};
|
|
191
213
|
</script>
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<el-table ref="table" :data="list" :stripe="stripe" :border="border" :max-height="maxHeight" :highlight-current-row="highlightCurrentRow" @current-change="handleCurrentChange" :row-class-name="rowClassName" @selection-change="handleSelectionChange">
|
|
3
|
+
<el-table ref="table" :data="list" :stripe="stripe" :border="border" :max-height="maxHeight" :highlight-current-row="highlightCurrentRow" @current-change="handleCurrentChange" :row-class-name="rowClassName" @selection-change="handleSelectionChange" @row-click="handleRowClick">
|
|
4
|
+
<el-table-column v-if="radio" label="单选" fixed width="65" align="center">
|
|
5
|
+
<template slot-scope="{ row }">
|
|
6
|
+
<el-radio style="margin:0" v-model="radioValue" :label="row" @click.native.prevent.stop="radioClick(row)"> </el-radio>
|
|
7
|
+
</template>
|
|
8
|
+
</el-table-column>
|
|
4
9
|
<slot></slot>
|
|
5
10
|
</el-table>
|
|
6
11
|
<ElePage v-if="ifPage" ref="ElePage" :isStartGetData="isStartGetData" :total="pageTotal" @change="getData"></ElePage>
|
|
@@ -22,6 +27,8 @@
|
|
|
22
27
|
rowClassName: { type: Function, default: () => '' }, // 行的 className 的回调方法,也可以使用字符串为所有行设置一个固定的 className
|
|
23
28
|
isStartGetData: { type: Boolean, default: true }, // 是否开始就获取数据
|
|
24
29
|
pageKey: { type: Array, default: () => (['pageStart', 'pageNums']) }, // 分页参数
|
|
30
|
+
radio: { type: Boolean, default: false }, // 是否显示单选
|
|
31
|
+
selectable: { type: [Boolean,Function], default: false }, // 控制是否可选
|
|
25
32
|
},
|
|
26
33
|
data() {
|
|
27
34
|
return {
|
|
@@ -29,18 +36,25 @@
|
|
|
29
36
|
pageTotal: 0,
|
|
30
37
|
currentRow: null,
|
|
31
38
|
multipleSelection: [],
|
|
39
|
+
radioValue: null,
|
|
32
40
|
};
|
|
33
41
|
},
|
|
34
42
|
watch: {
|
|
35
43
|
data: {
|
|
36
44
|
handler(val) {
|
|
37
45
|
this.list = val
|
|
46
|
+
this.radioValue = null
|
|
38
47
|
},
|
|
39
48
|
deep: true
|
|
40
|
-
}
|
|
49
|
+
},
|
|
50
|
+
total: {
|
|
51
|
+
handler(val) {
|
|
52
|
+
this.pageTotal = val
|
|
53
|
+
},
|
|
54
|
+
deep: true
|
|
55
|
+
},
|
|
41
56
|
},
|
|
42
57
|
mounted() {
|
|
43
|
-
this.pageTotal = this.total
|
|
44
58
|
if(this.data && this.data.length){
|
|
45
59
|
this.list = this.data
|
|
46
60
|
}
|
|
@@ -52,6 +66,7 @@
|
|
|
52
66
|
// 获取数据
|
|
53
67
|
getData(page){
|
|
54
68
|
this.$nextTick(() => {
|
|
69
|
+
if(!this.api) return
|
|
55
70
|
this.global.post(this.api, {
|
|
56
71
|
...this.query,
|
|
57
72
|
[this.pageKey[0]]: page.pageStart,
|
|
@@ -63,6 +78,7 @@
|
|
|
63
78
|
this.list = obj.list || [obj]
|
|
64
79
|
this.pageTotal = obj.total
|
|
65
80
|
}
|
|
81
|
+
this.radioValue = null
|
|
66
82
|
})
|
|
67
83
|
});
|
|
68
84
|
},
|
|
@@ -89,10 +105,23 @@
|
|
|
89
105
|
this.$refs.table.clearSelection();
|
|
90
106
|
}
|
|
91
107
|
},
|
|
108
|
+
// 当选择项发生变化时会触发该事件
|
|
92
109
|
handleSelectionChange(val) {
|
|
93
110
|
this.multipleSelection = val;
|
|
94
111
|
this.$emit('selection-change', val)
|
|
95
|
-
}
|
|
112
|
+
},
|
|
113
|
+
// 当某一行被点击时会触发该事件
|
|
114
|
+
handleRowClick(row, event, column){
|
|
115
|
+
if(this.selectable && !this.selectable(row)) return
|
|
116
|
+
this.$refs.table.toggleRowSelection(row)
|
|
117
|
+
if(this.radio){
|
|
118
|
+
this.radioClick(row)
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
// 单选点击
|
|
122
|
+
radioClick(row){
|
|
123
|
+
this.radioValue = this.radioValue === row ? null : row
|
|
124
|
+
},
|
|
96
125
|
}
|
|
97
126
|
};
|
|
98
127
|
</script>
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div v-if="!view" class="u-ti f-mb20">
|
|
4
|
+
<div class="f-f1">
|
|
5
|
+
<div class="f-ib">
|
|
6
|
+
车型销售代码前6位
|
|
7
|
+
<b-form-input style="display:inline-block;width:200px;margin-right:20px;" v-model.trim="queryParams.bm6" placeholder="请输入车型销售代码前六位" autocomplete="off"/>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="f-ib">
|
|
10
|
+
产品类型
|
|
11
|
+
<EleSelect style="display:inline-block;width:200px;margin-right:20px;" v-model="queryParams.typeCodes" :options="global.state('dataDictionarys','CardScopeProductType',[],'refDetailCode')" multiple/>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="f-ib">
|
|
14
|
+
产品编号
|
|
15
|
+
<b-form-input style="display:inline-block;width:130px;" v-model.trim="queryParams.productNo" placeholder="请输入产品编号" autocomplete="off"/>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div>
|
|
19
|
+
<b-button size="sm" variant="primary" @click="search()">查询</b-button>
|
|
20
|
+
<b-button size="sm" variant="default" @click="reset()">重置</b-button>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div v-if="!view" class="f-mb10">
|
|
24
|
+
<b-button size="sm" variant="success" @click="add()">新增</b-button>
|
|
25
|
+
<b-button size="sm" variant="primary" @click="edit()">编辑</b-button>
|
|
26
|
+
<b-button size="sm" variant="danger" @click="del()">删除</b-button>
|
|
27
|
+
<EleUpload class="f-ml10 f-mr10 f-vam" text="批量导入" importText="模板下载" size="sm" :data="{relationCode:'importProductScope'}" :paramMap="{
|
|
28
|
+
phaseType,
|
|
29
|
+
cardTemplateCode,
|
|
30
|
+
cardMakeOrderNo,
|
|
31
|
+
relationNo: queryParams.relationNo,
|
|
32
|
+
}" accept=".xlsx" :showFileList="false" :importRelationCode="'importProductScopeTmpl'" :abnormal="true" @importsClosure="search" />
|
|
33
|
+
<b-button v-if="ifBatchProductRef" class="f-mr10" size="sm" variant="warning" @click="$refs.BatchProductRef.visible=true">引用历史批次适用产品</b-button>
|
|
34
|
+
<b-button size="sm" variant="default" @click="global.exportExcel({
|
|
35
|
+
fileExportType:'FileExportTypeCardProductScopeRpt',
|
|
36
|
+
fileRelactionCode:'FileExportTypeCardProductScopeRpt',
|
|
37
|
+
parameters:{
|
|
38
|
+
...queryParams,
|
|
39
|
+
phaseType,
|
|
40
|
+
cardTemplateCode,
|
|
41
|
+
cardMakeOrderNo,
|
|
42
|
+
}
|
|
43
|
+
})">导出</b-button>
|
|
44
|
+
</div>
|
|
45
|
+
<EleTable ref="EleTable" :api="`${this.global.isdev}${cardNos.length ? '/v2/cardcoupons/scope/queryProductScopeByCardNos' : '/v2/cardcoupons/scope/queryProductScope'}`" :query="cardNos.length ? {cardNos} : {
|
|
46
|
+
...queryParams,
|
|
47
|
+
phaseType,
|
|
48
|
+
cardTemplateCode,
|
|
49
|
+
cardMakeOrderNo,
|
|
50
|
+
}" :selectable="selectable" :isStartGetData="['TEMPLATE'].includes(phaseType)" :ifPage="!cardNos.length">
|
|
51
|
+
<el-table-column type="selection" fixed width="50" :selectable="selectable" />
|
|
52
|
+
<el-table-column label="是否参与打折" prop="discountFlag" min-width="168" show-overflow-tooltip />
|
|
53
|
+
<el-table-column label="车型销售代码前6位" prop="bm6" min-width="168" show-overflow-tooltip />
|
|
54
|
+
<el-table-column label="品牌" prop="brandCode" min-width="168" show-overflow-tooltip />
|
|
55
|
+
<el-table-column label="来源" prop="factoryCode" min-width="168" show-overflow-tooltip />
|
|
56
|
+
<el-table-column label="车系" prop="seriesCode" min-width="168" show-overflow-tooltip />
|
|
57
|
+
<el-table-column label="产品类型" prop="typeName" min-width="168" show-overflow-tooltip />
|
|
58
|
+
<el-table-column label="产品编码" prop="productNo" min-width="168" show-overflow-tooltip />
|
|
59
|
+
<el-table-column label="工时是否参与计算" prop="calculateFlag" min-width="168" show-overflow-tooltip />
|
|
60
|
+
<el-table-column label="更新人" prop="updateByStr" min-width="168" show-overflow-tooltip />
|
|
61
|
+
<el-table-column label="更新时间" prop="updateTimeStr" min-width="168" show-overflow-tooltip />
|
|
62
|
+
</EleTable>
|
|
63
|
+
|
|
64
|
+
<EleDialog ref="EleDialog" :title="`${title}适用产品`" size="mini">
|
|
65
|
+
<el-form class="m-form" :model="form" ref="form" label-position="right" label-width="145px">
|
|
66
|
+
<el-form-item label="是否参与打折" prop="discountFlag" :rules="[{required: true, message: '不能为空'}]">
|
|
67
|
+
<EleSelect v-model="form.discountFlag" :options="[{label:'是',value:'是'},{label:'否',value:'否'}]"></EleSelect>
|
|
68
|
+
</el-form-item>
|
|
69
|
+
<el-form-item label="车型销售代码前6位" prop="bm6" :rules="[{required: true, message: '不能为空'}]">
|
|
70
|
+
<el-input v-model="form.bm6" :maxlength="6" @blur="getModelInfoByBm6"></el-input>
|
|
71
|
+
</el-form-item>
|
|
72
|
+
<el-form-item label="品牌" prop="brandCode">
|
|
73
|
+
<EleSelect v-model="form.brandCode" :options="global.userInfo.benzProductVehicleSet" optionLabel="" optionValue="" @change="brandCodeChange"></EleSelect>
|
|
74
|
+
</el-form-item>
|
|
75
|
+
<el-form-item label="来源" prop="factoryCode">
|
|
76
|
+
<EleSelect ref="factoryCode" v-model="form.factoryCode" :api="`${global.isdev}/v1/sys/car/getDynamicCarRelationInfo.htm`" :query="{fatherProperty:'brandCode',fatherPropertyValue:this.form.brandCode}" :pageNums="1000" optionLabel="" optionValue="" :disabled="!form.brandCode" @change="factoryCodeChange"></EleSelect>
|
|
77
|
+
</el-form-item>
|
|
78
|
+
<el-form-item label="车系" prop="seriesCode">
|
|
79
|
+
<EleSelect ref="seriesCode" v-model="form.seriesCode" :api="`${global.isdev}/v1/sys/car/getDynamicCarRelationInfo.htm`" :query="{fatherProperty:'factoryCode',fatherPropertyValue:`${this.form.brandCode}|${this.form.factoryCode}`}" :pageNums="1000" optionLabel="" optionValue="" :disabled="!form.factoryCode" @change="seriesCodeChange"></EleSelect>
|
|
80
|
+
</el-form-item>
|
|
81
|
+
<el-form-item label="产品类型" prop="typeCode" :rules="[{required: true, message: '不能为空'}]">
|
|
82
|
+
<EleSelect ref="typeCode" v-model="form.typeCode" :options="global.state('dataDictionarys','CardScopeProductType',[],'refDetailCode')" @change="val => val == 'CSPT-All' ? form.productNo = '' : null"/>
|
|
83
|
+
</el-form-item>
|
|
84
|
+
<el-form-item label="产品编码" prop="productNo" :rules="[form.typeCode != 'CSPT-All' ? {required: true, message: '不能为空'} : {}]">
|
|
85
|
+
<el-input v-model="form.productNo" :disabled="form.typeCode == 'CSPT-All'"></el-input>
|
|
86
|
+
</el-form-item>
|
|
87
|
+
<el-form-item label="工时是否参与计算" prop="calculateFlag" :rules="[{required: true, message: '不能为空'}]">
|
|
88
|
+
<EleSelect v-model="form.calculateFlag" :options="[{label:'是',value:'是'},{label:'否',value:'否'}]"></EleSelect>
|
|
89
|
+
</el-form-item>
|
|
90
|
+
<div class="f-tar">
|
|
91
|
+
<b-button size="sm" variant="default" @click="$refs.EleDialog.visible=false">取消</b-button>
|
|
92
|
+
<b-button size="sm" variant="primary" @click="saveProductScope()">确认</b-button>
|
|
93
|
+
</div>
|
|
94
|
+
</el-form>
|
|
95
|
+
</EleDialog>
|
|
96
|
+
<EleDialog ref="BatchProductRef" :title="`历史制卡批次选择`" size="large">
|
|
97
|
+
<BatchProductRef @cancel="$refs.BatchProductRef.visible=false" @confirm="followProductScope"></BatchProductRef>
|
|
98
|
+
</EleDialog>
|
|
99
|
+
</div>
|
|
100
|
+
</template>
|
|
101
|
+
|
|
102
|
+
<script>
|
|
103
|
+
import BatchProductRef from './BatchProductRef.vue'
|
|
104
|
+
export default {
|
|
105
|
+
components: {
|
|
106
|
+
BatchProductRef,
|
|
107
|
+
},
|
|
108
|
+
props:{
|
|
109
|
+
phaseType: { type: String, default: 'TEMPLATE' }, // TEPLATE-模板,BATCH-批次,MODIFY-批次修改
|
|
110
|
+
cardTemplateCode: { type: String, default(){return this.$route.query.cardTemplateCode || ''} }, // 模板编号,必填
|
|
111
|
+
cardMakeOrderNo: { type: String, default(){return undefined} }, // 批次号,['BATCH','MODIFY'].includes(phaseType)时必填
|
|
112
|
+
relationNo: { type: String, default(){return undefined} }, // ['MODIFY'].includes(phaseType)查看时必填
|
|
113
|
+
bm6: { type: String, default: '' }, // 放车辆卡匹配bm6
|
|
114
|
+
cardNos: { type: Array, default(){return []} }, // 通过卡券查询适用产品
|
|
115
|
+
ifBatchProductRef: { type: Boolean, default: false }, // 是否显示引用历史批次适用产品
|
|
116
|
+
selectable: { type: Function }, // 仅对 type=selection 的列有效,类型为 Function,Function 的返回值用来决定这一行的 CheckBox 是否可以勾选,Function(row, index)
|
|
117
|
+
view: Boolean, // 仅查看
|
|
118
|
+
},
|
|
119
|
+
data() {
|
|
120
|
+
return {
|
|
121
|
+
queryParamsBase: {
|
|
122
|
+
relationNo: this.relationNo,
|
|
123
|
+
bm6: this.bm6,
|
|
124
|
+
typeCodes: [],
|
|
125
|
+
productNo: '',
|
|
126
|
+
},
|
|
127
|
+
queryParams: {},
|
|
128
|
+
title: '',
|
|
129
|
+
formBase: {
|
|
130
|
+
discountFlag: '',
|
|
131
|
+
bm6: '',
|
|
132
|
+
brandCode: '',
|
|
133
|
+
factoryCode: '',
|
|
134
|
+
seriesCode: '',
|
|
135
|
+
typeCode: '',
|
|
136
|
+
productNo: '',
|
|
137
|
+
calculateFlag: '',
|
|
138
|
+
},
|
|
139
|
+
form: {},
|
|
140
|
+
bm6Flag: true,
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
mounted() {
|
|
144
|
+
this.reset()
|
|
145
|
+
if(this.phaseType == 'BATCH'){
|
|
146
|
+
this.search()
|
|
147
|
+
}
|
|
148
|
+
if(this.phaseType == 'MODIFY'){
|
|
149
|
+
if(this.relationNo){
|
|
150
|
+
this.search()
|
|
151
|
+
} else {
|
|
152
|
+
this.getSequence()
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
methods: {
|
|
157
|
+
reset(){
|
|
158
|
+
this.queryParams = JSON.parse(JSON.stringify(this.queryParamsBase))
|
|
159
|
+
},
|
|
160
|
+
getSequence(){
|
|
161
|
+
this.global.post(`${this.global.isdev}/systemFoundation_service/v1/sys/seq/getSequence`,{serviceCode:'CARDMORDRELSEQ'},obj => {
|
|
162
|
+
this.queryParamsBase.relationNo = obj
|
|
163
|
+
this.queryParams.relationNo = obj
|
|
164
|
+
// 批次修改带入历史
|
|
165
|
+
this.global.post(`${this.global.isdev}/v2/cardcoupons/scope/modifyInitProductScope`,{
|
|
166
|
+
phaseType: this.phaseType,
|
|
167
|
+
cardTemplateCode: this.cardTemplateCode,
|
|
168
|
+
cardMakeOrderNo: this.cardMakeOrderNo,
|
|
169
|
+
relationNo: this.queryParams.relationNo,
|
|
170
|
+
},obj=>{
|
|
171
|
+
this.search()
|
|
172
|
+
})
|
|
173
|
+
})
|
|
174
|
+
},
|
|
175
|
+
search(){
|
|
176
|
+
this.$nextTick(() => {
|
|
177
|
+
if(['BATCH','MODIFY'].includes(this.phaseType) && (!this.cardTemplateCode || !this.cardMakeOrderNo)) return
|
|
178
|
+
if(['MODIFY'].includes(this.phaseType) && !this.queryParams.relationNo) return
|
|
179
|
+
this.$refs.EleTable.resetData()
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
add(){
|
|
183
|
+
this.title = '新增'
|
|
184
|
+
this.form = JSON.parse(JSON.stringify(this.formBase))
|
|
185
|
+
this.$refs.EleDialog.visible = true
|
|
186
|
+
},
|
|
187
|
+
edit(){
|
|
188
|
+
if(this.$refs.EleTable.multipleSelection.length != 1) return this.$message('请选择一条数据')
|
|
189
|
+
this.title = '编辑'
|
|
190
|
+
this.bm6Flag = false
|
|
191
|
+
this.form = JSON.parse(JSON.stringify(this.$refs.EleTable.multipleSelection[0]))
|
|
192
|
+
this.$refs.EleDialog.visible = true
|
|
193
|
+
this.$nextTick(() => {
|
|
194
|
+
setTimeout(() => {
|
|
195
|
+
this.bm6Flag = true
|
|
196
|
+
}, 100);
|
|
197
|
+
});
|
|
198
|
+
},
|
|
199
|
+
// bm6查车型
|
|
200
|
+
getModelInfoByBm6(){
|
|
201
|
+
this.$nextTick(() => {
|
|
202
|
+
if(this.form.bm6.length == 6){
|
|
203
|
+
this.global.post(`${this.global.isdev}/systemFoundation_service/v1/sys/car/getModelInfoByBm6`,{bm6:this.form.bm6},obj => {
|
|
204
|
+
if(obj){
|
|
205
|
+
this.bm6Flag = false
|
|
206
|
+
this.form.brandCode = obj.brandCode
|
|
207
|
+
this.form.factoryCode = obj.factoryCode
|
|
208
|
+
this.form.seriesCode = obj.seriesCode
|
|
209
|
+
this.$refs.factoryCode.resetData()
|
|
210
|
+
this.$refs.seriesCode.resetData()
|
|
211
|
+
this.$nextTick(() => {
|
|
212
|
+
this.bm6Flag = true
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
})
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
// 品牌改变
|
|
220
|
+
brandCodeChange(){
|
|
221
|
+
if(this.bm6Flag){
|
|
222
|
+
this.form.factoryCode=''
|
|
223
|
+
this.$refs.factoryCode.resetData()
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
// 来源改变
|
|
227
|
+
factoryCodeChange(){
|
|
228
|
+
if(this.bm6Flag){
|
|
229
|
+
this.form.seriesCode=''
|
|
230
|
+
this.$refs.seriesCode.resetData()
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
// 车系改变,车型查bm6
|
|
234
|
+
seriesCodeChange(){
|
|
235
|
+
if(this.bm6Flag){
|
|
236
|
+
this.$nextTick(() => {
|
|
237
|
+
if(this.form.brandCode && this.form.factoryCode && this.form.seriesCode){
|
|
238
|
+
this.global.post(`${this.global.isdev}/systemFoundation_service/v1/sys/car/getModelBm6Info`,{
|
|
239
|
+
brandCode: this.form.brandCode,
|
|
240
|
+
factoryCode: this.form.factoryCode,
|
|
241
|
+
seriesCode: this.form.seriesCode,
|
|
242
|
+
},obj => {
|
|
243
|
+
if(obj){
|
|
244
|
+
this.form.bm6 = obj.bm6
|
|
245
|
+
}
|
|
246
|
+
})
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
// 新增/编辑适用产品 确认
|
|
252
|
+
saveProductScope(){
|
|
253
|
+
this.$refs.form.validate((valid) => {
|
|
254
|
+
if (valid) {
|
|
255
|
+
this.global.post(`${this.global.isdev}/v2/cardcoupons/scope/saveProductScope`,{
|
|
256
|
+
...this.form,
|
|
257
|
+
typeName: this.$refs.typeCode.getSelect().label,
|
|
258
|
+
phaseType: this.phaseType,
|
|
259
|
+
cardTemplateCode: this.cardTemplateCode,
|
|
260
|
+
cardMakeOrderNo: this.cardMakeOrderNo,
|
|
261
|
+
relationNo: this.queryParams.relationNo,
|
|
262
|
+
},obj => {
|
|
263
|
+
this.$message.success('操作成功')
|
|
264
|
+
this.$refs.EleDialog.visible = false
|
|
265
|
+
this.$refs.EleTable.resetData('')
|
|
266
|
+
})
|
|
267
|
+
}
|
|
268
|
+
})
|
|
269
|
+
},
|
|
270
|
+
// 删除
|
|
271
|
+
del(){
|
|
272
|
+
if(!this.$refs.EleTable.multipleSelection.length) return this.$message('请先选择数据')
|
|
273
|
+
this.$confirm('是否确认删除本次选择的数据', '提示', {
|
|
274
|
+
confirmButtonText: '确认',
|
|
275
|
+
cancelButtonText: '取消',
|
|
276
|
+
type: 'warning'
|
|
277
|
+
}).then(() => {
|
|
278
|
+
this.global.post(`${this.global.isdev}/v2/cardcoupons/scope/delProductScope`, {
|
|
279
|
+
ids: this.$refs.EleTable.multipleSelection.map(item => item.id),
|
|
280
|
+
phaseType: this.phaseType,
|
|
281
|
+
cardTemplateCode: this.cardTemplateCode,
|
|
282
|
+
cardMakeOrderNo: this.cardMakeOrderNo,
|
|
283
|
+
relationNo: this.queryParams.relationNo,
|
|
284
|
+
}, obj => {
|
|
285
|
+
this.$message.success('删除成功')
|
|
286
|
+
this.$refs.EleTable.resetData('')
|
|
287
|
+
})
|
|
288
|
+
})
|
|
289
|
+
},
|
|
290
|
+
// 引用历史批次产品
|
|
291
|
+
followProductScope(row){
|
|
292
|
+
this.global.post(`${this.global.isdev}/v2/cardcoupons/scope/followProductScope`, {
|
|
293
|
+
phaseType: this.phaseType,
|
|
294
|
+
cardTemplateCode: this.cardTemplateCode,
|
|
295
|
+
cardMakeOrderNo: this.cardMakeOrderNo,
|
|
296
|
+
followCardMakeOrderNo: row.cardMakeOrderNo,
|
|
297
|
+
relationNo: this.queryParams.relationNo,
|
|
298
|
+
}, obj => {
|
|
299
|
+
this.$message.success('引用成功')
|
|
300
|
+
this.$refs.BatchProductRef.visible = false
|
|
301
|
+
this.$refs.EleTable.resetData()
|
|
302
|
+
})
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
}
|
|
306
|
+
</script>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<b-row class="f-mb10">
|
|
4
|
+
<b-col>
|
|
5
|
+
<b-form-fieldset horizontal label="卡券批次号" :label-cols="4" class="text-right">
|
|
6
|
+
<b-form-input autocomplete="off" v-model.trim="query.cardMakeOrderNo"></b-form-input>
|
|
7
|
+
</b-form-fieldset>
|
|
8
|
+
</b-col>
|
|
9
|
+
<b-col>
|
|
10
|
+
<b-form-fieldset horizontal label="卡券批次名称" :label-cols="4" class="text-right">
|
|
11
|
+
<b-form-input autocomplete="off" v-model.trim="query.batchName"></b-form-input>
|
|
12
|
+
</b-form-fieldset>
|
|
13
|
+
</b-col>
|
|
14
|
+
<b-col>
|
|
15
|
+
<b-form-fieldset horizontal label="制卡日期" :label-cols="4" class="text-right">
|
|
16
|
+
<EleDatePicker ref="inDateOrder" type="daterange" valueFormat="yyyy-MM-dd" @change="val => {query.makeDateStart = val[0];query.makeDateEnd = val[1]}" />
|
|
17
|
+
</b-form-fieldset>
|
|
18
|
+
</b-col>
|
|
19
|
+
</b-row>
|
|
20
|
+
<div class="f-mb20 f-tar">
|
|
21
|
+
<b-button size="sm" variant="primary" @click="$refs.EleTable.resetData()">查询</b-button>
|
|
22
|
+
<b-button size="sm" variant="default" @click="reset()">重置</b-button>
|
|
23
|
+
</div>
|
|
24
|
+
<EleTable class="f-mb20" ref="EleTable" :api="`${this.global.isdev}/v2/cardcoupons/batch/query.htm`" :query="query" radio>
|
|
25
|
+
<el-table-column label="批次号" prop="cardMakeOrderNo" min-width="168" show-overflow-tooltip />
|
|
26
|
+
<el-table-column label="批次名称" prop="batchName" min-width="168" show-overflow-tooltip />
|
|
27
|
+
<el-table-column label="制卡人" prop="makeEmpName" min-width="168" show-overflow-tooltip />
|
|
28
|
+
<el-table-column label="制卡时间" prop="makeDate" min-width="168" show-overflow-tooltip />
|
|
29
|
+
</EleTable>
|
|
30
|
+
<div class="f-tar">
|
|
31
|
+
<b-button size="sm" variant="default" @click="$emit('cancel')">取消</b-button>
|
|
32
|
+
<b-button size="sm" variant="primary" @click="confirm">确认</b-button>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
<script>
|
|
37
|
+
export default {
|
|
38
|
+
data() {
|
|
39
|
+
return {
|
|
40
|
+
queryBase: {
|
|
41
|
+
cardTemplateCode: this.$route.query.cardTemplateCode || '',
|
|
42
|
+
cardMakeOrderNo: '',
|
|
43
|
+
batchName: '',
|
|
44
|
+
makeDateStart: '',
|
|
45
|
+
makeDateEnd: '',
|
|
46
|
+
},
|
|
47
|
+
query: {},
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
mounted() {
|
|
51
|
+
this.reset()
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
reset(){
|
|
55
|
+
this.query = JSON.parse(JSON.stringify(this.queryBase))
|
|
56
|
+
},
|
|
57
|
+
confirm(){
|
|
58
|
+
if(!this.$refs.EleTable.radioValue) return this.$message('请选择一条数据')
|
|
59
|
+
this.$emit('confirm',this.$refs.EleTable.radioValue)
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
}
|
|
63
|
+
</script>
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
</el-tab-pane>
|
|
155
155
|
|
|
156
156
|
<el-tab-pane label="配置管理" name="second" disabled>
|
|
157
|
-
<LshVehicle :vehicleVo="selCont" v-show="!bindFlag" :isAdd="isAdd" @preserve="preserve1" @cancel="cancel"/>
|
|
157
|
+
<LshVehicle ref="LshVehicle" :vehicleVo="selCont" v-show="!bindFlag" :isAdd="isAdd" @preserve="preserve1" @cancel="cancel"/>
|
|
158
158
|
<LshCust :bindFlag="bindFlag" :custVo="selCont" @changeMaster="changeMaster" @preserve="preserve" v-show="bindFlag" @cancel="cancel"/>
|
|
159
159
|
</el-tab-pane>
|
|
160
160
|
</el-tabs>
|
|
@@ -309,7 +309,10 @@ export default {
|
|
|
309
309
|
}
|
|
310
310
|
})
|
|
311
311
|
}else{
|
|
312
|
-
this.$emit('comfirm',
|
|
312
|
+
this.$emit('comfirm', {
|
|
313
|
+
...this.selCont,
|
|
314
|
+
bm6: this.$refs.LshVehicle.bm6,
|
|
315
|
+
})
|
|
313
316
|
}
|
|
314
317
|
}
|
|
315
318
|
})
|
|
@@ -2028,7 +2028,8 @@
|
|
|
2028
2028
|
</div>
|
|
2029
2029
|
<el-row :gutter="10">
|
|
2030
2030
|
<el-col :span="8" class="f-mt5 f-mb5" v-for="(item,index) in portrayalCarTagArrFilter" :key="index">
|
|
2031
|
-
<div class="f-
|
|
2031
|
+
<div class="f-c0 f-wwb">{{ item.name }}</div>
|
|
2032
|
+
<div class="f-c6 f-wwb">{{ item.tagValue }}</div>
|
|
2032
2033
|
</el-col>
|
|
2033
2034
|
</el-row>
|
|
2034
2035
|
</el-tab-pane>
|
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
<template slot-scope="scope">{{ scope.$index + 1 + listIndex }}</template>
|
|
10
10
|
</el-table-column>
|
|
11
11
|
<el-table-column type="selection" width="55" fixed="left" v-if="operateType == 'multipleTable'" />
|
|
12
|
+
<el-table-column label="单选" width="65" fixed="left" v-if="operateType == 'radio'">
|
|
13
|
+
<template slot-scope="{ row }">
|
|
14
|
+
<el-radio style="margin:0" v-model="radioValue" :label="row"> </el-radio>
|
|
15
|
+
</template>
|
|
16
|
+
</el-table-column>
|
|
12
17
|
<el-table-column
|
|
13
18
|
show-overflow-tooltip
|
|
14
19
|
v-for="(item, i) in fields"
|
|
@@ -23,6 +28,7 @@
|
|
|
23
28
|
<slot :name="item.columnCode" :row="data[scope.$index]">{{ scope.row[item.columnCode] }}</slot>
|
|
24
29
|
</template>
|
|
25
30
|
</el-table-column>
|
|
31
|
+
<slot name="tableEnd"></slot>
|
|
26
32
|
<el-table-column
|
|
27
33
|
v-show="custRow.length"
|
|
28
34
|
v-for="item in custRow"
|
|
@@ -130,6 +136,13 @@
|
|
|
130
136
|
default: 1000
|
|
131
137
|
}
|
|
132
138
|
},
|
|
139
|
+
watch: {
|
|
140
|
+
data: {
|
|
141
|
+
handler(val) {
|
|
142
|
+
this.radioValue = null
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
},
|
|
133
146
|
computed: {
|
|
134
147
|
listIndex(){
|
|
135
148
|
return (this.pageNum - 1) * this.pageSize
|
|
@@ -141,6 +154,7 @@
|
|
|
141
154
|
fields: [], // columns to display
|
|
142
155
|
fixColumn: [], // column fixed left
|
|
143
156
|
ifTable: true,
|
|
157
|
+
radioValue: null,
|
|
144
158
|
}
|
|
145
159
|
},
|
|
146
160
|
created() {
|
|
@@ -38,6 +38,19 @@
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
</el-table-column>
|
|
41
|
+
<el-table-column
|
|
42
|
+
v-show="custRow.length"
|
|
43
|
+
v-for="item in custRow"
|
|
44
|
+
:key="item.prop"
|
|
45
|
+
:label="item.label"
|
|
46
|
+
:prop="item.prop"
|
|
47
|
+
:min-width="item.width"
|
|
48
|
+
fixed="right"
|
|
49
|
+
>
|
|
50
|
+
<template slot-scope="scope">
|
|
51
|
+
<slot :name="item.prop" :row="data[scope.$index]">{{ scope.row[item.prop] }}</slot>
|
|
52
|
+
</template>
|
|
53
|
+
</el-table-column>
|
|
41
54
|
</el-table>
|
|
42
55
|
<dialog-model ref="dialog" @handleOk="handleOk" />
|
|
43
56
|
</div>
|
|
@@ -66,6 +79,10 @@
|
|
|
66
79
|
type: String,
|
|
67
80
|
default: ''
|
|
68
81
|
},
|
|
82
|
+
custRow: {
|
|
83
|
+
type: Array,
|
|
84
|
+
default: () => []
|
|
85
|
+
},
|
|
69
86
|
/**
|
|
70
87
|
* index
|
|
71
88
|
*/
|