Commit 242d8c0c by 张权

数据迁移优化

1 parent 3f4072c3
......@@ -777,24 +777,36 @@ export default {
getDateList(seqNo, pack, attr) {
this.$apis.beforeSale.dateBycarNo({ seqNo }).then(res => {
if (res != null) {
let tip = false
if (pack.packageCode == 'PC0007' || pack.packageCode == 'PC0005') {
this.productList.map(el => {
if (el.packageCode == pack.packageCode) {
el.groupAttributeList.map(ele => {
ele.attributeList.map(item => {
if (item.attributeDesc == '服务期限') {
if (item?.optionList?.length < 4) {
item.optionList.push({ value: '4', label: '4年' })
item.optionList.push({ value: '5', label: '5年' })
} else if (item?.optionList?.length == 4) {
item.optionList.push({ value: '5', label: '5年' })
// if (item?.optionList?.length < 4) {
// item.optionList.push({ value: '4', label: '4年' })
// item.optionList.push({ value: '5', label: '5年' })
// } else if (item?.optionList?.length == 4) {
// 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}`
pack.groupAttributeList.map(el => {
if (el.attributeName == 'service_period') {
......
......@@ -84,7 +84,7 @@
</div>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
function date_format(date) {
var date2 = new Date(date)
var YY = date2.getFullYear() + '-'
......@@ -203,6 +203,14 @@ export default {
{
value: '3',
label: '3年'
},
{
value: '4',
label: '4年'
},
{
value: '5',
label: '5年'
}
],
dialogEditOptions: [
......@@ -500,4 +508,4 @@ export default {
/deep/ .el-pagination {
margin-top: 20px;
}
</style>
\ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!