Commit 242d8c0c by 张权

数据迁移优化

1 parent 3f4072c3
...@@ -777,24 +777,36 @@ export default { ...@@ -777,24 +777,36 @@ export default {
getDateList(seqNo, pack, attr) { getDateList(seqNo, pack, attr) {
this.$apis.beforeSale.dateBycarNo({ seqNo }).then(res => { this.$apis.beforeSale.dateBycarNo({ seqNo }).then(res => {
if (res != null) { if (res != null) {
let tip = false
if (pack.packageCode == 'PC0007' || pack.packageCode == 'PC0005') { if (pack.packageCode == 'PC0007' || pack.packageCode == 'PC0005') {
this.productList.map(el => { this.productList.map(el => {
if (el.packageCode == pack.packageCode) { if (el.packageCode == pack.packageCode) {
el.groupAttributeList.map(ele => { el.groupAttributeList.map(ele => {
ele.attributeList.map(item => { ele.attributeList.map(item => {
if (item.attributeDesc == '服务期限') { if (item.attributeDesc == '服务期限') {
if (item?.optionList?.length < 4) { // if (item?.optionList?.length < 4) {
item.optionList.push({ value: '4', label: '4年' }) // item.optionList.push({ value: '4', label: '4年' })
item.optionList.push({ value: '5', label: '5年' }) // item.optionList.push({ value: '5', label: '5年' })
} else if (item?.optionList?.length == 4) { // } else if (item?.optionList?.length == 4) {
item.optionList.push({ value: '5', label: '5年' }) // item.optionList.push({ value: '5', label: '5年' })
// }
const Target = item.optionList.find(item => {
return item.value == `${res.servicePeriod}`
})
if (!Target) {
tip = true
} }
console.log(Target, 78978979)
} }
}) })
}) })
} }
}) })
} }
if (tip) {
this.productModal[pack.idName]['service_period'] = ''
return this.$message.error('该卡号服务年限暂未配置,请联系运营平台人员')
}
this.productModal[pack.idName]['service_period'] = `${res.servicePeriod}` this.productModal[pack.idName]['service_period'] = `${res.servicePeriod}`
pack.groupAttributeList.map(el => { pack.groupAttributeList.map(el => {
if (el.attributeName == 'service_period') { if (el.attributeName == 'service_period') {
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
function date_format(date) { function date_format(date) {
var date2 = new Date(date) var date2 = new Date(date)
var YY = date2.getFullYear() + '-' var YY = date2.getFullYear() + '-'
...@@ -203,6 +203,14 @@ export default { ...@@ -203,6 +203,14 @@ export default {
{ {
value: '3', value: '3',
label: '3年' label: '3年'
},
{
value: '4',
label: '4年'
},
{
value: '5',
label: '5年'
} }
], ],
dialogEditOptions: [ dialogEditOptions: [
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!