|
|
|
@ -38,12 +38,13 @@
|
|
|
|
|
@click="handleDelete" |
|
|
|
|
>删 除 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button icon="UploadFilled" type="danger" plain @click="handleImport">导 入 </el-button> |
|
|
|
|
|
|
|
|
|
<!-- <el-button type="warning"--> |
|
|
|
|
<!-- plain--> |
|
|
|
|
<!-- icon="el-icon-download"--> |
|
|
|
|
<!-- @click="handleExport">导 出--> |
|
|
|
|
<!-- </el-button>--> |
|
|
|
|
<!-- <el-button type="warning" |
|
|
|
|
plain |
|
|
|
|
icon="el-icon-download" |
|
|
|
|
@click="handleExport">导 出 |
|
|
|
|
</el-button> --> |
|
|
|
|
</template> |
|
|
|
|
<!-- <template #menu="{row,index,size}">--> |
|
|
|
|
<!-- <el-button type="danger"--> |
|
|
|
@ -51,9 +52,9 @@
|
|
|
|
|
<!-- @click="$refs.crud.rowAdd()">新增</el-button>--> |
|
|
|
|
<!-- </template>--> |
|
|
|
|
</avue-crud> |
|
|
|
|
<el-dialog v-model="Detailspop" title="详情" width="60%"> |
|
|
|
|
<el-dialog v-model="Detailspop" title="详情" width="60%"> |
|
|
|
|
<el-form |
|
|
|
|
v-loading="Formloading" |
|
|
|
|
v-loading="Formloading" |
|
|
|
|
class="el_formInfo" |
|
|
|
|
:model="formInfo" |
|
|
|
|
label-width="300px" |
|
|
|
@ -89,50 +90,56 @@
|
|
|
|
|
<el-input v-model="formInfo.details" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-tabs type="border-card"> |
|
|
|
|
<el-tab-pane label="干线"> |
|
|
|
|
<div class="el_groundline" v-for="item in groundlineZd" :key="item.dictKey"> |
|
|
|
|
<div class="checkbox checked" v-if="item.cost !=null"></div> |
|
|
|
|
<el-form-item :label="item.label + '金额'"> |
|
|
|
|
<el-input :value="item.cost ? item.cost : '暂无'" disabled/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="单位"> |
|
|
|
|
<el-input :value="item.formulaModeName ? item.formulaModeName : '暂无'" disabled/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
<el-tab-pane label="仓库"> |
|
|
|
|
<div class="el_groundline_box"> |
|
|
|
|
<div class="el_groundline" v-for="item in warehouseZd" :key="item.dictKey"> |
|
|
|
|
<div class="checkbox checked" v-if="item.cost !=null"></div> |
|
|
|
|
<el-form-item :label="item.label + '金额'"> |
|
|
|
|
<el-input :value="item.cost ? item.cost : '暂无'" disabled/> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="单位"> |
|
|
|
|
<el-input :value="item.formulaModeName ? item.formulaModeName : '暂无'" disabled/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
<el-tab-pane label="配送"> |
|
|
|
|
<div class="el_groundline_box"> |
|
|
|
|
<div class="el_groundline" v-for="item in DeliveryZd" :key="item.dictKey"> |
|
|
|
|
<div class="checkbox checked" v-if="item.cost !=null"></div> |
|
|
|
|
<el-tabs type="border-card"> |
|
|
|
|
<el-tab-pane label="干线"> |
|
|
|
|
<div class="el_groundline" v-for="item in groundlineZd" :key="item.dictKey"> |
|
|
|
|
<div class="checkbox checked" v-if="item.cost != null"></div> |
|
|
|
|
<el-form-item :label="item.label + '金额'"> |
|
|
|
|
<el-input :value="item.cost ? item.cost : '暂无'" disabled/> |
|
|
|
|
<el-input :value="item.cost ? item.cost : '暂无'" disabled /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="单位"> |
|
|
|
|
<el-input :value="item.formulaModeName ? item.formulaModeName : '暂无'" disabled/> |
|
|
|
|
<el-input :value="item.formulaModeName ? item.formulaModeName : '暂无'" disabled /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
</el-tabs> |
|
|
|
|
</el-form> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
<el-tab-pane label="仓库"> |
|
|
|
|
<div class="el_groundline_box"> |
|
|
|
|
<div class="el_groundline" v-for="item in warehouseZd" :key="item.dictKey"> |
|
|
|
|
<div class="checkbox checked" v-if="item.cost != null"></div> |
|
|
|
|
<el-form-item :label="item.label + '金额'"> |
|
|
|
|
<el-input :value="item.cost ? item.cost : '暂无'" disabled /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="单位"> |
|
|
|
|
<el-input |
|
|
|
|
:value="item.formulaModeName ? item.formulaModeName : '暂无'" |
|
|
|
|
disabled |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
<el-tab-pane label="配送"> |
|
|
|
|
<div class="el_groundline_box"> |
|
|
|
|
<div class="el_groundline" v-for="item in DeliveryZd" :key="item.dictKey"> |
|
|
|
|
<div class="checkbox checked" v-if="item.cost != null"></div> |
|
|
|
|
<el-form-item :label="item.label + '金额'"> |
|
|
|
|
<el-input :value="item.cost ? item.cost : '暂无'" disabled /> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="单位"> |
|
|
|
|
<el-input |
|
|
|
|
:value="item.formulaModeName ? item.formulaModeName : '暂无'" |
|
|
|
|
disabled |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-tab-pane> |
|
|
|
|
</el-tabs> |
|
|
|
|
</el-form> |
|
|
|
|
<template #footer> |
|
|
|
|
<div class="dialog-footer"> |
|
|
|
|
<el-button @click="Detailspop = false">关闭</el-button> |
|
|
|
@ -142,6 +149,16 @@
|
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog title="用户基础价格导入" append-to-body v-model="excelBox" width="555px"> |
|
|
|
|
<avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter"> |
|
|
|
|
<template #excelTemplate> |
|
|
|
|
<el-button type="primary" @click="handleTemplate"> |
|
|
|
|
点击下载<i class="el-icon-download el-icon--right"></i> |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-form> |
|
|
|
|
</el-dialog> |
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -173,9 +190,36 @@ export default {
|
|
|
|
|
form: {}, |
|
|
|
|
query: {}, |
|
|
|
|
search: {}, |
|
|
|
|
excelBox: false, |
|
|
|
|
excelForm: {}, |
|
|
|
|
loading: true, |
|
|
|
|
Detailspop: false, |
|
|
|
|
Formloading:false, |
|
|
|
|
excelOption: { |
|
|
|
|
submitBtn: false, |
|
|
|
|
emptyBtn: false, |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: '文件上传', |
|
|
|
|
prop: 'excelFile', |
|
|
|
|
type: 'upload', |
|
|
|
|
drag: true, |
|
|
|
|
loadText: '文件上传,请稍等', |
|
|
|
|
span: 24, |
|
|
|
|
propsHttp: { |
|
|
|
|
res: 'data', |
|
|
|
|
}, |
|
|
|
|
tip: '请上传 .xls,.xlsx 标准格式文件', |
|
|
|
|
action: '/api/logpm-basicdata/driverArtery/import-stockArticle', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '模板下载', |
|
|
|
|
prop: 'excelTemplate', |
|
|
|
|
formslot: true, |
|
|
|
|
span: 24, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
Formloading: false, |
|
|
|
|
formInfo: {}, //详情弹窗表格 |
|
|
|
|
groundlineZd: [], //干线 |
|
|
|
|
warehouseZd: [], //仓库 |
|
|
|
@ -382,6 +426,13 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '发货单位', |
|
|
|
|
prop: 'name', |
|
|
|
|
type: 'input', |
|
|
|
|
width: '150px', |
|
|
|
|
span: 12, |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// label: "门店品牌", |
|
|
|
|
// prop: "storeBrandId", |
|
|
|
@ -448,6 +499,14 @@ export default {
|
|
|
|
|
dicData: [], |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '品类', |
|
|
|
|
prop: 'brandName', |
|
|
|
|
type: 'select', |
|
|
|
|
search: false, |
|
|
|
|
dicData: [], |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// label: '服务类型', //;1 干 2干仓 3干仓配 4干配 |
|
|
|
|
// prop: 'typeService', |
|
|
|
@ -483,20 +542,20 @@ export default {
|
|
|
|
|
// }, |
|
|
|
|
// ], |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
label: '一口价', |
|
|
|
|
prop: 'fixedPrice', |
|
|
|
|
type: 'input', |
|
|
|
|
width: '150px', |
|
|
|
|
span: 12, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: '请填写一口价', |
|
|
|
|
trigger: 'blur', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// label: '一口价', |
|
|
|
|
// prop: 'fixedPrice', |
|
|
|
|
// type: 'input', |
|
|
|
|
// width: '150px', |
|
|
|
|
// span: 12, |
|
|
|
|
// rules: [ |
|
|
|
|
// { |
|
|
|
|
// required: true, |
|
|
|
|
// message: '请填写一口价', |
|
|
|
|
// trigger: 'blur', |
|
|
|
|
// }, |
|
|
|
|
// ], |
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
label: '生效时间', |
|
|
|
@ -645,6 +704,23 @@ export default {
|
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
uploadAfter(res, done, loading, column) { |
|
|
|
|
window.console.log(column); |
|
|
|
|
this.excelBox = false; |
|
|
|
|
this.refreshChange(); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
//下载模板 |
|
|
|
|
handleTemplate() { |
|
|
|
|
console.log('下载模板!!!'); |
|
|
|
|
exportBlob( |
|
|
|
|
`/api/logpm-basicdata/driverArtery/export-basicdataDriverArteryMb?${ |
|
|
|
|
this.website.tokenHeader |
|
|
|
|
}=${getToken()}` |
|
|
|
|
).then(res => { |
|
|
|
|
downloadXls(res.data, '用户基础价格导入模板.xlsx'); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
fuzhi(led, ed) { |
|
|
|
|
// console.log(">>>>",led,ed); |
|
|
|
|
this.option.column[27].dicData = led; |
|
|
|
@ -767,54 +843,56 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
enrichDictionaryWithCosts(dictionary, dataArray, itemNameField) { |
|
|
|
|
dictionary.forEach(dictItem => { |
|
|
|
|
console.log(dictItem,'dictItem'); |
|
|
|
|
|
|
|
|
|
enrichDictionaryWithCosts(dictionary, dataArray, itemNameField) { |
|
|
|
|
dictionary.forEach(dictItem => { |
|
|
|
|
console.log(dictItem, 'dictItem'); |
|
|
|
|
dataArray.forEach(dataItem => { |
|
|
|
|
if (dictItem.label === dataItem[itemNameField]) { |
|
|
|
|
dictItem.formulaModeName = dataItem.formulaModeName; |
|
|
|
|
dictItem.cost = dataItem.cost; |
|
|
|
|
} |
|
|
|
|
if (dictItem.label === dataItem[itemNameField]) { |
|
|
|
|
dictItem.formulaModeName = dataItem.formulaModeName; |
|
|
|
|
dictItem.cost = dataItem.cost; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 查看按钮 |
|
|
|
|
beforeOpen(done, type) { |
|
|
|
|
this.Detailspop = true; //开启弹窗 |
|
|
|
|
this.Formloading=true |
|
|
|
|
this.formInfo={} |
|
|
|
|
this.Formloading = true; |
|
|
|
|
this.formInfo = {}; |
|
|
|
|
getDetail(this.form.id).then(res => { |
|
|
|
|
console.log(res, 'res'); |
|
|
|
|
this.form = res.data.data; |
|
|
|
|
this.formInfo.fixedPrice = |
|
|
|
|
this.form.fixedPrice == 0 ? '否' : this.form.fixedPrice == 1 ? '是' : '暂无'; |
|
|
|
|
this.formInfo.categoryName = this.form.categoryName?this.form.categoryName:'暂无'; //品类 |
|
|
|
|
this.formInfo.effectiveTime = this.form.effectiveTime?this.form.effectiveTime:'暂无'; //生效时间 |
|
|
|
|
this.formInfo.expirationTime = this.form.expirationTime?this.form.expirationTime:'暂无'; //截止时间 |
|
|
|
|
this.formInfo.brand=this.form.brandName?this.form.brandName:'暂无'; //品牌 |
|
|
|
|
this.formInfo.details = res.data.data.details?res.data.data.details.map(res => res.typeName).join(','):'未选择'; //服务类型 |
|
|
|
|
if(res.data.data.details){ |
|
|
|
|
this.formInfo.categoryName = this.form.categoryName ? this.form.categoryName : '暂无'; //品类 |
|
|
|
|
this.formInfo.effectiveTime = this.form.effectiveTime ? this.form.effectiveTime : '暂无'; //生效时间 |
|
|
|
|
this.formInfo.expirationTime = this.form.expirationTime ? this.form.expirationTime : '暂无'; //截止时间 |
|
|
|
|
this.formInfo.brand = this.form.brandName ? this.form.brandName : '暂无'; //品牌 |
|
|
|
|
this.formInfo.details = res.data.data.details |
|
|
|
|
? res.data.data.details.map(res => res.typeName).join(',') |
|
|
|
|
: '未选择'; //服务类型 |
|
|
|
|
if (res.data.data.details) { |
|
|
|
|
res.data.data.details.forEach(res => { |
|
|
|
|
if (res.typeName == '干线') { |
|
|
|
|
this.groundlineInfo.push(res); |
|
|
|
|
} else if (res.typeName == '仓库') { |
|
|
|
|
this.warehouseInfo.push(res); |
|
|
|
|
} else if (res.typeName == '配送') { |
|
|
|
|
this.DeliveryInfo.push(res); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (res.typeName == '干线') { |
|
|
|
|
this.groundlineInfo.push(res); |
|
|
|
|
} else if (res.typeName == '仓库') { |
|
|
|
|
this.warehouseInfo.push(res); |
|
|
|
|
} else if (res.typeName == '配送') { |
|
|
|
|
this.DeliveryInfo.push(res); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.enrichDictionaryWithCosts( this.groundlineZd,this.groundlineInfo, 'itemName'); |
|
|
|
|
this.enrichDictionaryWithCosts( this.DeliveryZd, this.DeliveryInfo,'itemName'); |
|
|
|
|
this.enrichDictionaryWithCosts(this.warehouseZd,this.warehouseInfo, 'itemName'); |
|
|
|
|
$_QueryUserName({ |
|
|
|
|
|
|
|
|
|
this.enrichDictionaryWithCosts(this.groundlineZd, this.groundlineInfo, 'itemName'); |
|
|
|
|
this.enrichDictionaryWithCosts(this.DeliveryZd, this.DeliveryInfo, 'itemName'); |
|
|
|
|
this.enrichDictionaryWithCosts(this.warehouseZd, this.warehouseInfo, 'itemName'); |
|
|
|
|
$_QueryUserName({ |
|
|
|
|
id: res.data.data.itemName, |
|
|
|
|
}).then(res => { |
|
|
|
|
this.formInfo.clientName = res.data.data.clientName; |
|
|
|
|
console.log(res, '客户名称'); |
|
|
|
|
this.Formloading=false; |
|
|
|
|
this.Formloading = false; |
|
|
|
|
}); |
|
|
|
|
// 查询品牌 |
|
|
|
|
// $_brand({ |
|
|
|
@ -824,7 +902,7 @@ export default {
|
|
|
|
|
// console.log(res, '品牌'); |
|
|
|
|
// this.formInfo.brand = res.data.data.brandName; |
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
$_category({ |
|
|
|
|
id: this.form.category, |
|
|
|
@ -847,10 +925,6 @@ export default {
|
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
searchReset() { |
|
|
|
|
this.query = {}; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
@ -879,6 +953,10 @@ export default {
|
|
|
|
|
refreshChange() { |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
// 导入 |
|
|
|
|
handleImport() { |
|
|
|
|
this.excelBox = true; |
|
|
|
|
}, |
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
|
@ -908,14 +986,12 @@ export default {
|
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
this.data = data.records; |
|
|
|
|
this.data.forEach(res=>{ |
|
|
|
|
res.fixedPrice |
|
|
|
|
if(res.fixedPrice==0){ |
|
|
|
|
res.fixedPrice='否' |
|
|
|
|
}else if(res.fixedPrice==1)( |
|
|
|
|
res.fixedPrice='是' |
|
|
|
|
) |
|
|
|
|
}) |
|
|
|
|
this.data.forEach(res => { |
|
|
|
|
res.fixedPrice; |
|
|
|
|
if (res.fixedPrice == 0) { |
|
|
|
|
res.fixedPrice = '否'; |
|
|
|
|
} else if (res.fixedPrice == 1) res.fixedPrice = '是'; |
|
|
|
|
}); |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
@ -957,10 +1033,10 @@ export default {
|
|
|
|
|
.el_groundline { |
|
|
|
|
display: flex; |
|
|
|
|
} |
|
|
|
|
.el_groundline_box{ |
|
|
|
|
.el_groundline_box { |
|
|
|
|
display: flex; |
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
.el_groundline{ |
|
|
|
|
.el_groundline { |
|
|
|
|
width: 50%; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -990,7 +1066,12 @@ export default {
|
|
|
|
|
opacity: 0; /* 初始时勾隐藏 */ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.checkbox.checked::after{ |
|
|
|
|
.checkbox.checked::after { |
|
|
|
|
opacity: 1; /* 勾显示 */ |
|
|
|
|
} |
|
|
|
|
:deep(.avue-form__group--flex) { |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: row; |
|
|
|
|
flex-wrap: nowrap !important; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|