Commit 899afbe6 by Jaxon

style: 格式化

1 parent 59179749
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
</template> </template>
<template #applicableAreaSelect> <template #applicableAreaSelect>
<!-- <ApplicableAreaSelect v-model="applicableAreas" <!-- <ApplicableAreaSelect v-model="applicableAreas"
:options="baseData.applicableAreaList"
width="100%" width="100%"
:options="baseData.applicableAreaList"
@selection-change="handleAreaSelectChange" /> --> @selection-change="handleAreaSelectChange" /> -->
<ApplicableAreaQuerySelect v-model="applicableAreas" <ApplicableAreaQuerySelect v-model="applicableAreas"
width="100%" width="100%"
...@@ -198,25 +198,29 @@ export default { ...@@ -198,25 +198,29 @@ export default {
inventoryType: "", inventoryType: "",
}, },
getListApi: getPackageManageList, getListApi: getPackageManageList,
showFormData: [{ showFormData: [
{
label: "套餐名称", label: "套餐名称",
name: "packageName", name: "packageName",
maxlength: "50", maxlength: "50",
type: "input", type: "input",
isClear: true, isClear: true,
keyFn: this.keyDowmGetList, keyFn: this.keyDowmGetList,
}, { },
{
label: "套餐别名", label: "套餐别名",
name: "packageAlias", name: "packageAlias",
maxlength: "50", maxlength: "50",
type: "input", type: "input",
isClear: true, isClear: true,
keyFn: this.keyDowmGetList, keyFn: this.keyDowmGetList,
}, { },
{
label: "套餐ID", label: "套餐ID",
name: "matchPackageCode", name: "matchPackageCode",
addHtml: "matchPackageCode", addHtml: "matchPackageCode",
}, { },
{
label: "上架门店", label: "上架门店",
name: "merchantId", name: "merchantId",
type: "select", type: "select",
...@@ -224,7 +228,8 @@ export default { ...@@ -224,7 +228,8 @@ export default {
optionId: "merchantId", optionId: "merchantId",
optionLabel: "merchantName", optionLabel: "merchantName",
optionsName: "merchantServiceList", optionsName: "merchantServiceList",
}, { },
{
label: "服务对接", label: "服务对接",
name: "yqMerchantId", name: "yqMerchantId",
type: "select", type: "select",
...@@ -232,7 +237,8 @@ export default { ...@@ -232,7 +237,8 @@ export default {
optionId: "yqMerchantId", optionId: "yqMerchantId",
optionLabel: "yqMerchantName", optionLabel: "yqMerchantName",
optionsName: "yqMerchantServiceList", optionsName: "yqMerchantServiceList",
}, { },
{
label: "业务场景", label: "业务场景",
name: "baseSceneCodeList", name: "baseSceneCodeList",
type: "select", type: "select",
...@@ -240,7 +246,8 @@ export default { ...@@ -240,7 +246,8 @@ export default {
optionId: "baseSceneCode", optionId: "baseSceneCode",
optionLabel: "name", optionLabel: "name",
optionsName: "baseSceneList", optionsName: "baseSceneList",
}, { },
{
label: "状态", label: "状态",
name: "status", name: "status",
type: "select", type: "select",
...@@ -248,7 +255,8 @@ export default { ...@@ -248,7 +255,8 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "statusList", optionsName: "statusList",
}, { },
{
label: "财务校验", label: "财务校验",
name: "financeCheckFlag", name: "financeCheckFlag",
type: "select", type: "select",
...@@ -256,7 +264,8 @@ export default { ...@@ -256,7 +264,8 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "financeCheckFlagList", optionsName: "financeCheckFlagList",
}, { },
{
label: "库存模式", label: "库存模式",
name: "inventoryType", name: "inventoryType",
type: "select", type: "select",
...@@ -264,11 +273,13 @@ export default { ...@@ -264,11 +273,13 @@ export default {
optionId: "confId", optionId: "confId",
optionLabel: "confValue", optionLabel: "confValue",
optionsName: "inventoryTypeList", optionsName: "inventoryTypeList",
}, { },
{
label: "适用区域", label: "适用区域",
name: "applicableArea", name: "applicableArea",
addHtml: "applicableAreaSelect", addHtml: "applicableAreaSelect",
}], },
],
// 表格参数 // 表格参数
tableParams: { tableParams: {
mutiSelectUniqueKey: "id", mutiSelectUniqueKey: "id",
...@@ -278,107 +289,123 @@ export default { ...@@ -278,107 +289,123 @@ export default {
tableOption: { tableOption: {
width: "170", width: "170",
}, },
tableColumns: [{ tableColumns: [
{
label: "序号", label: "序号",
prop: "ownSerialNum", prop: "ownSerialNum",
type: "ownSerialNum", type: "ownSerialNum",
width: "100", width: "100",
}, { },
{
label: "套餐ID", label: "套餐ID",
prop: "packageCode", prop: "packageCode",
width: "200", width: "200",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.packageCode || "-"; return cellValue.packageCode || "-";
}, },
}, { },
{
label: "套餐名称", label: "套餐名称",
prop: "packageName", prop: "packageName",
width: "150", width: "150",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.packageName || "-"; return cellValue.packageName || "-";
}, },
}, { },
{
label: "套餐别名", label: "套餐别名",
prop: "packageAlias", prop: "packageAlias",
width: "150", width: "150",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.packageAlias || "-"; return cellValue.packageAlias || "-";
}, },
}, { },
{
label: "售价/元", label: "售价/元",
prop: "sellPrice", prop: "sellPrice",
formatter: (cellValue) => { formatter: (cellValue) => {
return this.priceFilter(cellValue.sellPrice); return this.priceFilter(cellValue.sellPrice);
}, },
}, { },
{
label: "最低售价/元", label: "最低售价/元",
prop: "minSellPrice", prop: "minSellPrice",
formatter: (cellValue) => { formatter: (cellValue) => {
return this.priceFilter(cellValue.minSellPrice); return this.priceFilter(cellValue.minSellPrice);
}, },
width: "100", width: "100",
}, { },
{
label: "产品、升级成本/元", label: "产品、升级成本/元",
prop: "upgradeProductCost", prop: "upgradeProductCost",
formatter: (cellValue) => { formatter: (cellValue) => {
return this.priceFilter(cellValue.upgradeProductCost); return this.priceFilter(cellValue.upgradeProductCost);
}, },
width: "150", width: "150",
}, { },
{
label: "虚拟对账成本/元", label: "虚拟对账成本/元",
prop: "virtualAccountCost", prop: "virtualAccountCost",
formatter: (cellValue) => { formatter: (cellValue) => {
return this.priceFilter(cellValue.virtualAccountCost); return this.priceFilter(cellValue.virtualAccountCost);
}, },
width: "150", width: "150",
}, { },
{
label: "回收成本/元", label: "回收成本/元",
prop: "recoveryCost", prop: "recoveryCost",
formatter: (cellValue) => { formatter: (cellValue) => {
return this.priceFilter(cellValue.recoveryCost); return this.priceFilter(cellValue.recoveryCost);
}, },
width: "100", width: "100",
}, { },
{
label: "嘀加成本/元", label: "嘀加成本/元",
prop: "djCost", prop: "djCost",
formatter: (cellValue) => { formatter: (cellValue) => {
return this.priceFilter(cellValue.djCost); return this.priceFilter(cellValue.djCost);
}, },
width: "100", width: "100",
}, { },
{
label: "第三方成本/元", label: "第三方成本/元",
prop: "thirdPartyCost", prop: "thirdPartyCost",
formatter: (cellValue) => { formatter: (cellValue) => {
return this.priceFilter(cellValue.thirdPartyCost); return this.priceFilter(cellValue.thirdPartyCost);
}, },
width: "120", width: "120",
}, { },
{
label: "库存模式", label: "库存模式",
prop: "inventoryType", prop: "inventoryType",
width: "120", width: "120",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.inventoryType == 1 ? "虚拟" : cellValue.inventoryType == 2 ? "实物" : "-"; return cellValue.inventoryType == 1 ? "虚拟" : cellValue.inventoryType == 2 ? "实物" : "-";
}, },
}, { },
{
label: "上架门店", label: "上架门店",
name: "", name: "",
type: "slot", type: "slot",
addHtml: "merchantName", addHtml: "merchantName",
width: 100, width: 100,
}, { },
{
label: "服务对接", label: "服务对接",
prop: "yqMerchantName", prop: "yqMerchantName",
type: "slot", type: "slot",
addHtml: "yqMerchantName", addHtml: "yqMerchantName",
width: 100, width: 100,
}, { },
{
label: "业务场景", label: "业务场景",
prop: "baseSceneName", prop: "baseSceneName",
// formatter: (cellValue) => { // formatter: (cellValue) => {
// return this.baseData.baseSceneList[cellValue.sceneType] || "-"; // return this.baseData.baseSceneList[cellValue.sceneType] || "-";
// }, // },
width: 130, width: 130,
}, { },
{
label: "状态", label: "状态",
prop: "status", prop: "status",
width: "100px", width: "100px",
...@@ -398,47 +425,58 @@ export default { ...@@ -398,47 +425,58 @@ export default {
0: "已下架", 0: "已下架",
}[cellValue.status]; }[cellValue.status];
}, },
}, { },
{
label: "财务校验", label: "财务校验",
prop: "financeCheckFlag", prop: "financeCheckFlag",
width: "100px", width: "100px",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.financeCheckFlag == "Y" ? "开启" : "关闭"; return cellValue.financeCheckFlag == "Y" ? "开启" : "关闭";
}, },
}, { },
{
label: "创建日期", label: "创建日期",
prop: "createdDate", prop: "createdDate",
width: "150", width: "150",
formatter: (cellValue) => { formatter: (cellValue) => {
return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, "YYYY-MM-DD HH:mm:ss") : ""; return cellValue.createdDate ? Util.dateFormate(cellValue.createdDate, "YYYY-MM-DD HH:mm:ss") : "";
}, },
}], },
],
}, },
// 基本数据 // 基本数据
baseData: { baseData: {
yqMerchantServiceList: [], yqMerchantServiceList: [],
merchantServiceList: [], merchantServiceList: [],
applicableAreaList: [], applicableAreaList: [],
statusList: [{ statusList: [
{
confId: 3, confId: 3,
confValue: "草稿", confValue: "草稿",
}, { },
{
confId: 4, confId: 4,
confValue: "待审核", confValue: "待审核",
}, { },
{
confId: 1, confId: 1,
confValue: "已上架", confValue: "已上架",
}, { },
{
confId: 0, confId: 0,
confValue: "已下架", confValue: "已下架",
}], },
financeCheckFlagList: [{ ],
financeCheckFlagList: [
{
confId: "Y", confId: "Y",
confValue: "开启", confValue: "开启",
}, { },
{
confId: "N", confId: "N",
confValue: "关闭", confValue: "关闭",
}], },
],
inventoryTypeList: [ inventoryTypeList: [
{ {
confId: 2, confId: 2,
...@@ -454,6 +492,11 @@ export default { ...@@ -454,6 +492,11 @@ export default {
applicableAreas: [], applicableAreas: [],
}; };
}, },
computed: {
...mapState({
dowloadList: state => state.d2admin.user.dowloadList,
}),
},
mounted() { mounted() {
let allOpt = { confId: "", confValue: "全部" }; let allOpt = { confId: "", confValue: "全部" };
this.baseData.statusList.unshift(allOpt); this.baseData.statusList.unshift(allOpt);
...@@ -480,11 +523,6 @@ export default { ...@@ -480,11 +523,6 @@ export default {
// 获取业务场景数据 // 获取业务场景数据
this.getBaseCodeList(); this.getBaseCodeList();
}, },
computed: {
...mapState({
dowloadList: state => state.d2admin.user.dowloadList,
}),
},
methods: { methods: {
...mapActions({ ...mapActions({
get: "d2admin/base/get", get: "d2admin/base/get",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!