Commit f2a7c227 by zhangxw

4月中需求开发

1 parent 29727715
...@@ -533,6 +533,16 @@ const uploadImageApi = params => { ...@@ -533,6 +533,16 @@ const uploadImageApi = params => {
noSignAttr: ['file'] noSignAttr: ['file']
}) })
} }
// 获取产品名称 (权益订单列表查询条件)
const getProductListApi = params => {
params.method = 'scrm.api.equity.service.spu.select.get'
return http({
url: 'rop-scrm-equity/router',
method: 'GET',
data: params,
sign: true
})
}
export default { export default {
uploadImageApi, uploadImageApi,
newSaveWriteOff, newSaveWriteOff,
...@@ -581,5 +591,6 @@ export default { ...@@ -581,5 +591,6 @@ export default {
getBatchTaskListApi, getBatchTaskListApi,
getTaskDetailListApi, getTaskDetailListApi,
createBatchTaskApi, createBatchTaskApi,
exportErrorDataApi exportErrorDataApi,
getProductListApi
} }
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<div class="operate_wrap"> <div class="operate_wrap">
<span class="table_title">合同列表</span> <span class="table_title">合同列表</span>
<div class="operate_btn"> <div class="operate_btn">
<GLButton type="primary" fn="批量初始化" plain :size="size" @click="batchInitTmpl">批量初始化</GLButton>
<GLButton type="primary" fn="批量更换" plain :size="size" @click="batchChangeTmpl">批量更换</GLButton> <GLButton type="primary" fn="批量更换" plain :size="size" @click="batchChangeTmpl">批量更换</GLButton>
<el-button type="primary" :size="size" @click="handleExport">导出</el-button> <el-button type="primary" :size="size" @click="handleExport">导出</el-button>
</div> </div>
...@@ -573,6 +574,16 @@ export default { ...@@ -573,6 +574,16 @@ export default {
ids ids
} }
}, },
// 批量初始化合同
batchInitTmpl() {
const data = this.checkedRow || []
const ids = data.map(item => item.contractId)
if (!ids.length) return this.$message.error('请选择需要初始化的合同')
this.tipObj = {
visible: true,
ids
}
},
// 更换模板 // 更换模板
changeTmpl({ skuPackageCode, skuId, contractId }, baseType) { changeTmpl({ skuPackageCode, skuId, contractId }, baseType) {
this.changeContractObj = { this.changeContractObj = {
......
...@@ -211,7 +211,7 @@ export default { ...@@ -211,7 +211,7 @@ export default {
searchForm: { searchForm: {
queryText: '', queryText: '',
orderStatus: '', orderStatus: '',
packageCode: '', spuName: '',
merchantId: '', merchantId: '',
dqtId: '', dqtId: '',
pqId: '', pqId: '',
...@@ -286,11 +286,11 @@ export default { ...@@ -286,11 +286,11 @@ export default {
}, },
{ {
label: '产品名称', label: '产品名称',
name: 'packageCode', name: 'spuName',
type: 'select', type: 'select',
optionList: [], optionList: [],
optionId: 'packageCode', optionId: 'spuNameCode',
optionLabel: 'packageName', optionLabel: 'spuName',
optionsName: 'goodsStatusList' optionsName: 'goodsStatusList'
}, },
{ {
...@@ -470,6 +470,11 @@ export default { ...@@ -470,6 +470,11 @@ export default {
}, },
{ {
label: '产品名称', label: '产品名称',
prop: 'spuName',
width: '200px'
},
{
label: '商品名称',
prop: 'packageName', prop: 'packageName',
width: '200px' width: '200px'
}, },
...@@ -733,7 +738,8 @@ export default { ...@@ -733,7 +738,8 @@ export default {
// this.editNotify.code == '0' ? 1500 : 3000 // this.editNotify.code == '0' ? 1500 : 3000
// ) // )
// } // }
this.$apis.beforeSale.getProListApi({}).then(res => { this.$apis.beforeSale.getProductListApi({}).then(res => {
res?.forEach(v => v.spuNameCode = v.spuName)
this.baseData.goodsStatusList = res this.baseData.goodsStatusList = res
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}) })
......
...@@ -500,8 +500,15 @@ export default { ...@@ -500,8 +500,15 @@ export default {
}, },
handleAddGrade() { handleAddGrade() {
const _gradeList = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] const _gradeList = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
if (this.gradeList.length == _gradeList.length) return this.$message.error(`最多添加${_gradeList.length}个规格`) // 拓展规格数量
const _grade = _gradeList[this.gradeList.length] const keyNum = 3
if (this.gradeList.length >= keyNum * _gradeList.length) return this.$message.error(`最多添加${keyNum * _gradeList.length}个规格`)
let _grade = _gradeList[this.gradeList.length]
for (var i = 1; i < keyNum; i++) {
if (this.gradeList.length >= i * _gradeList.length) {
_grade = `${_gradeList[this.gradeList.length - i * _gradeList.length]}${i}`
}
}
this.gradeList.push(addGradeItem(_grade, this.formObj.salePeriod)) this.gradeList.push(addGradeItem(_grade, this.formObj.salePeriod))
}, },
// 编辑的时候获取规格数据 // 编辑的时候获取规格数据
......
...@@ -193,6 +193,7 @@ export default { ...@@ -193,6 +193,7 @@ export default {
return Delta return Delta
}, },
addSection() { addSection() {
if (this.tableData.gradeConfigList?.length >= 20) return this.$message.error('最多添加20个价格区间')
// 获取最后一个的最大价格赋值到新增的最小价格 // 获取最后一个的最大价格赋值到新增的最小价格
const minPrice = this.tableData.gradeConfigList[this.tableData.gradeConfigList.length - 1]?.maxPrice || '' const minPrice = this.tableData.gradeConfigList[this.tableData.gradeConfigList.length - 1]?.maxPrice || ''
const arr = this.tableData.salePeriodData.map(item => { const arr = this.tableData.salePeriodData.map(item => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!