Browse Source

Merge branch 'dev' into pre-production

pre-production
pref_mail@163.com 11 months ago
parent
commit
e61b4fc52c
  1. 2
      src/views/basicdata/ConfigureBillingAndWarehousing/list.vue
  2. 0
      src/views/basicdata/TripartiteMaterial/add.vue
  3. 2
      src/views/basicdata/brand/basicClient.vue
  4. 7
      src/views/distribution/deliverylist/distributionDeliveryListdis.vue
  5. 172
      src/views/financialsector/FinanceHome.vue
  6. 96
      src/views/financialsector/Financialse/FinancialBill.vue
  7. 293
      src/views/financialsector/Financialse/FinancialTrunkLine.vue
  8. 1
      src/views/financialsector/Financialse/FinancialWarehousing.vue

2
src/views/basicdata/ConfigureBillingAndWarehousing/list.vue

@ -563,7 +563,7 @@ const remoteMethodBrand = async value => {
} }
}; };
remoteMethodBrand(); remoteMethodBrand('');
/** 搜索仓库 */ /** 搜索仓库 */
const getMaterialTree = async value => { const getMaterialTree = async value => {

0
src/views/basicdata/TripartiteMaterial/add.vue

2
src/views/basicdata/brand/basicClient.vue

@ -183,7 +183,7 @@
<P>请确认传入的文件为Excel文件格式</P> <P>请确认传入的文件为Excel文件格式</P>
<a <a
href="http://47.108.51.143:9000/logpm/other/%E5%AE%A2%E6%88%B7%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx" href="https://huo5you.oss-cn-chengdu.aliyuncs.com/other/%E5%AE%A2%E6%88%B7%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx"
download="客户模板.xlsx" download="客户模板.xlsx"
> >
<el-button type="primary" icon="Download"> 点击下载 </el-button> <el-button type="primary" icon="Download"> 点击下载 </el-button>

7
src/views/distribution/deliverylist/distributionDeliveryListdis.vue

@ -185,7 +185,7 @@
</el-row> </el-row>
<!-- 打印模块 --> <!-- 打印模块 -->
<el-dialog title="二维码" :visible.sync="isShow" width="780px" v-model="isShow"> <!-- <el-dialog title="二维码" :visible.sync="isShow" width="780px" v-model="isShow">
<div ref="tableRef"> <div ref="tableRef">
<div v-html="html"></div> <div v-html="html"></div>
</div> </div>
@ -194,7 +194,7 @@
<el-button type="primary" @click="handleExport"> </el-button> <el-button type="primary" @click="handleExport"> </el-button>
<el-button @click="isShow = false"> </el-button> <el-button @click="isShow = false"> </el-button>
</span> </span>
</el-dialog> </el-dialog> -->
</div> </div>
<el-dialog <el-dialog
@ -284,6 +284,9 @@
</template> </template>
</el-dialog> </el-dialog>
</basic-container> </basic-container>
<MyPrint :html="html" v-model="isShow" width="70%"></MyPrint>
<edittablehead <edittablehead
@setcolum="setnewcolum" @setcolum="setnewcolum"
@closce="showdrawer" @closce="showdrawer"

172
src/views/financialsector/FinanceHome.vue

@ -1,5 +1,5 @@
<template> <template>
<div class="content_box" v-loading='pageLoading'> <div class="content_box" v-loading="pageLoading">
<div class="header"> <div class="header">
<!-- 模板名称 --> <!-- 模板名称 -->
<div class="el_Template"> <div class="el_Template">
@ -7,7 +7,6 @@
<el-input v-model="form.TemplateName" style="width: 240px" placeholder="请输入模板名称" /> <el-input v-model="form.TemplateName" style="width: 240px" placeholder="请输入模板名称" />
</div> </div>
<!-- 品牌 --> <!-- 品牌 -->
<div class="el_Service"> <div class="el_Service">
<span class="name">品牌</span> <span class="name">品牌</span>
@ -38,8 +37,9 @@
:popper-append-to-body="false" :popper-append-to-body="false"
style="width: 340px" style="width: 340px"
multiple multiple
@change="handleChange"
@remove-tag="removeTag" @remove-tag="removeTag"
:loading='ServiceTypeLoading' :loading="ServiceTypeLoading"
> >
<el-option <el-option
v-for="item in ServiceList" v-for="item in ServiceList"
@ -47,7 +47,7 @@
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> >
<el-checkbox v-model="item.check" @change="isChecked(item)"> <el-checkbox v-model="item.check" @change="() => isChecked(item, true)">
{{ item.label }} {{ item.label }}
</el-checkbox> </el-checkbox>
</el-option> </el-option>
@ -56,16 +56,22 @@
</div> </div>
<!-- 模板内容 --> <!-- 模板内容 -->
<div class="content" > <div class="content">
<el-tabs type="border-card" v-model="Tabmenu"> <el-tabs type="border-card" v-model="Tabmenu">
<template v-for="item in ServiceList" :key="item.label"> <template v-for="item in ServiceList" :key="item.label">
<el-tab-pane :name="item.label" v-if="item.state" :label="item.label"> <el-tab-pane :name="item.label" v-if="item.state" :label="item.label">
<span v-if="item.label == '提货'"><FinancialBill @request-data="provideData" :templateData="templateInfo"/></span> <span v-if="item.label == '提货'"
<span v-if="item.label == '干线'"><FinancialTrunkLine @request-data="provideData" :templateData="templateInfo"/></span> ><FinancialBill @request-data="provideData" :templateData="templateInfo"
/></span>
<span v-if="item.label == '干线'"
><FinancialTrunkLine @request-data="provideData" :templateData="templateInfo"
/></span>
<span v-if="item.label == '仓储'" <span v-if="item.label == '仓储'"
><FinancialWarehousing @request-data="provideData" :templateData="templateInfo" ><FinancialWarehousing @request-data="provideData" :templateData="templateInfo"
/></span> /></span>
<span v-if="item.label == '配送'"><FinancialDelivery @request-data="provideData" :templateData="templateInfo"/></span> <span v-if="item.label == '配送'"
><FinancialDelivery @request-data="provideData" :templateData="templateInfo"
/></span>
<span v-if="item.label == '安装'">安装</span> <span v-if="item.label == '安装'">安装</span>
</el-tab-pane> </el-tab-pane>
</template> </template>
@ -75,11 +81,15 @@
</template> </template>
<script setup> <script setup>
import { ref, defineAsyncComponent,reactive, toRefs, computed, onMounted, nextTick, watch } from 'vue'; import { ref, defineAsyncComponent, getCurrentInstance } from 'vue';
import { getDictionaryBiz } from '@/api/system/dict'; // import { getDictionaryBiz } from '@/api/system/dict'; //
import { $_basicdataBrande,$_InfopriceTemplate} from '@/api/financialsector/index'; // import { $_basicdataBrande, $_InfopriceTemplate } from '@/api/financialsector/index'; //
import { ElMessage } from 'element-plus';
const $route = useRoute(); // const $route = useRoute(); //
const pageLoading=ref(true);// const pageLoading = ref(true); //
// vue
const instance = getCurrentInstance();
// //
const FinancialWarehousing = defineAsyncComponent(() => const FinancialWarehousing = defineAsyncComponent(() =>
import('@/views/financialsector/Financialse/FinancialWarehousing.vue') import('@/views/financialsector/Financialse/FinancialWarehousing.vue')
@ -96,85 +106,93 @@ const FinancialTrunkLine = defineAsyncComponent(() =>
const FinancialDelivery = defineAsyncComponent(() => const FinancialDelivery = defineAsyncComponent(() =>
import('@/views/financialsector/Financialse/FinancialDelivery.vue') import('@/views/financialsector/Financialse/FinancialDelivery.vue')
); );
const ServiceTypeLoading=ref(true);// const ServiceTypeLoading = ref(true); //
const form = ref({}); const form = ref({});
const brand=ref([]);// const brand = ref([]); //
const Tabmenu = ref('仓储'); const Tabmenu = ref('仓储');
const request=ref({});// const request = ref({}); //
const templateInfo = ref({}); const templateInfo = ref({});
// //
const ServiceList = ref([]); const ServiceList = ref([]);
// //
function updateDictionary(targetArray, dictionaryType) { function updateDictionary(targetArray, dictionaryType) {
getDictionaryBiz(dictionaryType).then(res => { getDictionaryBiz(dictionaryType)
console.log(res, '字典'); .then(res => {
if(res.data.code ==200){ console.log(res, '字典');
if(res.data.data.length){ if (res.data.code == 200) {
res.data.data.forEach(item => { if (res.data.data.length) {
targetArray.push({ res.data.data.forEach(item => {
value: item.dictKey, targetArray.push({
label: item.dictValue, value: item.dictKey,
id:item.id, label: item.dictValue,
}); id: item.id,
});
});
}
console.log('targetArray :>> ', targetArray);
}
})
.catch(() => {})
.finally(() => {
ServiceTypeLoading.value = false;
}); });
}
}
}).catch(()=>{
}).finally(()=>{
ServiceTypeLoading.value=false;
});
} }
// //
async function executeCheckedResults(results) { async function executeCheckedResults(results) {
for (const res of results) { for (const res of results) {
await new Promise(resolve => setTimeout(resolve, 500)); await new Promise(resolve => setTimeout(resolve, 500));
await isChecked(res); await isChecked(res);
await provideData() await provideData();
} }
pageLoading.value=false; pageLoading.value = false;
} }
// //
const onLoad= async()=>{ const onLoad = async () => {
await updateDictionary(ServiceList.value,'service_type');// await updateDictionary(ServiceList.value, 'service_type'); //
if($route.query.id){ if ($route.query.id) {
let data={ let data = {
id:$route.query.id id: $route.query.id,
} };
$_InfopriceTemplate(data).then(res=>{ $_InfopriceTemplate(data).then(res => {
console.log(res,'获取详情'); console.log(res, '获取详情');
if(res.data.code == 200){ if (res.data.code == 200) {
request.value=res.data.data;// request.value = res.data.data; //
form.value.brand=res.data.data.brandId||'';// form.value.brand = res.data.data.brandId || ''; //
form.value.TemplateName=res.data.data.name||'';// form.value.TemplateName = res.data.data.name || ''; //
form.value.ServiceType= res.data.data.serviceType.split(",")||[];// form.value.ServiceType = res.data.data.serviceType.split(',') || []; //
const result = ServiceList.value.filter(item => form.value.ServiceType.includes(item.value));
console.log('form.value.ServiceType :>> ', form.value.ServiceType);
const result = ServiceList.value.filter(item =>
form.value.ServiceType.includes(item.value)
);
// //
executeCheckedResults(result); executeCheckedResults(result);
} }
}) });
}else{ } else {
pageLoading.value=false pageLoading.value = false;
}
let data={
current:1,
size:1000,
} }
$_basicdataBrande(data).then(res=>{ let data = {
console.log(res,'品牌'); current: 1,
if(res.data.code == 200){ size: 1000,
brand.value=res.data.data };
$_basicdataBrande(data).then(res => {
console.log(res, '品牌');
if (res.data.code == 200) {
brand.value = res.data.data;
} }
}) });
} };
onLoad() onLoad();
// //
const isChecked = val => { const isChecked = (val, isChecked = false) => {
console.log(val,'val'); console.log(val, 'val');
/// ///
val.state = !val.state; val.state = !val.state;
if($route.query.id){ if ($route.query.id && !isChecked) {
val.check=!val.check; val.check = !val.check;
} }
// //
// //
@ -195,17 +213,23 @@ const removeTag = value => {
}; };
// //
const provideData = (data) => { const provideData = data => {
console.log(data,'来自子页面的数据'); console.log(data, '来自子页面的数据');
console.log(form.value,'form.value'); console.log(form.value, 'form.value');
templateInfo.value = form.value; templateInfo.value = form.value;
if(data){ if (data) {
templateInfo.value.code=data;// templateInfo.value.code = data; //
} }
if($route.query.id){ if ($route.query.id) {
templateInfo.value.request=request.value;// templateInfo.value.request = request.value; //
} }
}; };
const handleChange = () => {
console.log('instance :>> ', instance);
instance.ctx.$forceUpdate();
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

96
src/views/financialsector/Financialse/FinancialBill.vue

@ -173,9 +173,6 @@ const props = defineProps({
templateData: Object, templateData: Object,
}); });
console.log('props.templateData :>> ', props.templateData);
console.log(props, '来自父页面参数');
const instance = getCurrentInstance(); const instance = getCurrentInstance();
/** 表单实例 */ /** 表单实例 */
@ -294,8 +291,6 @@ const goriesloading = ref(false);
/** 计价方式改变时 */ /** 计价方式改变时 */
const handleChangePrcieMethod = value => { const handleChangePrcieMethod = value => {
console.log('value :>> ', value);
let activeItem: any = {}; let activeItem: any = {};
for (let i = 0; i < details.lowestType.length; i++) { for (let i = 0; i < details.lowestType.length; i++) {
const item = details.lowestType[i]; const item = details.lowestType[i];
@ -317,13 +312,11 @@ const handleTrunkLinePricingType = response => {
details.priceMethodType = data || []; details.priceMethodType = data || [];
if (props.templateData) return;
const _billTemplateDetailArr = []; const _billTemplateDetailArr = [];
for (let i = 0; i < details.priceMethodType.length; i++) { for (let i = 0; i < details.priceMethodType.length; i++) {
const value = details.priceMethodType[i]; const value = details.priceMethodType[i];
if (value.dictKey != '2') { if (value.dictKey != '2') {
_billTemplateDetailArr.push({ const _itemObj = {
title: value.dictValue + '计费品类', title: value.dictValue + '计费品类',
code: value.dictKey, code: value.dictKey,
categories: [ categories: [
@ -337,15 +330,84 @@ const handleTrunkLinePricingType = response => {
loading: false, loading: false,
}, },
], ],
}); };
if (!props.templateData.request) {
_billTemplateDetailArr.push(_itemObj);
continue;
}
if (!props.templateData.request) continue; const _arr = [];
// //
if (value.dictKey === '1') {
const { pickupPieceCategorys } = props.templateData.request;
if (pickupPieceCategorys && pickupPieceCategorys.length !== 0) {
for (let i = 0; i < pickupPieceCategorys.length; i++) {
const item = pickupPieceCategorys[i];
_arr.push({
reduce: i === 0 ? false : true,
plus: true,
goodsName: item.name,
goodsId: item.id,
goods: item.name,
goodsArr: [],
loading: false,
});
}
_itemObj.categories = _arr;
}
}
// //
if (value.dictKey === '4') {
const { pickupWeightCategorys } = props.templateData.request;
if (pickupWeightCategorys && pickupWeightCategorys.length !== 0) {
for (let i = 0; i < pickupWeightCategorys.length; i++) {
const item = pickupWeightCategorys[i];
_arr.push({
reduce: i === 0 ? false : true,
plus: true,
goodsName: item.name,
goodsId: item.id,
goods: item.name,
goodsArr: [],
loading: false,
});
}
_itemObj.categories = _arr;
}
}
// //
if (value.dictKey === '3') {
const { pickupCubeCategorys } = props.templateData.request;
if (pickupCubeCategorys && pickupCubeCategorys.length !== 0) {
for (let i = 0; i < pickupCubeCategorys.length; i++) {
const item = pickupCubeCategorys[i];
_arr.push({
reduce: i === 0 ? false : true,
plus: true,
goodsName: item.name,
goodsId: item.id,
goods: item.name,
goodsArr: [],
loading: false,
});
}
_itemObj.categories = _arr;
}
}
_billTemplateDetailArr.push(_itemObj);
} }
} }
@ -354,7 +416,6 @@ const handleTrunkLinePricingType = response => {
/** 处理最低计费价格 */ /** 处理最低计费价格 */
const handleLowestPrice = response => { const handleLowestPrice = response => {
console.log('response :>> ', response);
const { code, data } = response.data; const { code, data } = response.data;
if (code !== 200) return; if (code !== 200) return;
@ -378,20 +439,19 @@ const initDictionaryBiz = async () => {
const [trunkLineResult, minCostResult] = await Promise.all([trunkLinePromise, minCostPromise]); const [trunkLineResult, minCostResult] = await Promise.all([trunkLinePromise, minCostPromise]);
await nextTick(); await nextTick();
console.log('props.templateData.request :>> ', props.templateData.request);
if (Object.keys(props.templateData).length !== 0) { if (Object.keys(props.templateData).length !== 0) {
details.form = props.templateData.request; details.form = deepClone(props.templateData.request);
details.form.pickupPricingType = details.form.pickupPricingType.split(','); details.form.pickupPricingType = details.form.pickupPricingType
? details.form.pickupPricingType.split(',')
: [];
details.form.pickupIsByCategory += ''; details.form.pickupIsByCategory += '';
details.form.pickupMinCostType += ''; details.form.pickupMinCostType += '';
details.form.pickupIsUnifyAreaBill += ''; details.form.pickupIsUnifyAreaBill += '';
details.form.pickupIsMinCost += ''; details.form.pickupIsMinCost += '';
} }
console.log('details.form :>> ', details.form);
// 线 // 线
handleTrunkLinePricingType(trunkLineResult); handleTrunkLinePricingType(trunkLineResult);
handleLowestPrice(minCostResult); handleLowestPrice(minCostResult);
@ -426,7 +486,6 @@ const handlePlus = async (value: any, index: number) => {
await nextTick(); await nextTick();
instance.ctx.$refs[value.title + (index + 1)][0].focus(); instance.ctx.$refs[value.title + (index + 1)][0].focus();
console.log('instance :>> ', instance.ctx);
}; };
/** 删除品类 */ /** 删除品类 */
@ -497,7 +556,6 @@ const handleSubmit = async () => {
formRef.value.validate(async valid => { formRef.value.validate(async valid => {
if (!valid) return; if (!valid) return;
await emit('request-data'); // await emit('request-data'); //
console.log(props, 'props');
if (!props.templateData.TemplateName) { if (!props.templateData.TemplateName) {
ElMessage({ ElMessage({
message: '请输入模板名称', message: '请输入模板名称',

293
src/views/financialsector/Financialse/FinancialTrunkLine.vue

@ -73,7 +73,7 @@
<!-- 表格循环 --> <!-- 表格循环 -->
<div class="el_table_td" v-for="(item, index) in value.categories"> <div class="el_table_td" v-for="(item, index) in value.categories">
<div class="el_table_idNumber">{{ index+1 }}</div> <div class="el_table_idNumber">{{ index + 1 }}</div>
<el-select <el-select
:ref="value.title + index" :ref="value.title + index"
class="el_Cselect" class="el_Cselect"
@ -171,11 +171,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, reactive, getCurrentInstance, nextTick,defineEmits, defineComponent } from 'vue'; import { ref, reactive, getCurrentInstance, nextTick, defineEmits, defineComponent } from 'vue';
import { debounce, deepClone } from '@/utils/util'; import { debounce, deepClone } from '@/utils/util';
import { ElMessage, ElMessageBox } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
import { getDictionaryBiz } from '@/api/system/dict'; import { getDictionaryBiz } from '@/api/system/dict';
import { $_priceTemplate ,$_putpriceTemplate} from '@/api/financialsector/index'; // import { $_priceTemplate, $_putpriceTemplate } from '@/api/financialsector/index'; //
import { postFindCategoryInfo } from '@/api/distribution/CreateOrder.js'; import { postFindCategoryInfo } from '@/api/distribution/CreateOrder.js';
const emit = defineEmits(['request-data']); const emit = defineEmits(['request-data']);
defineComponent({ defineComponent({
@ -332,29 +332,105 @@ const handleTrunkLinePricingType = response => {
const _billTemplateDetailArr = []; const _billTemplateDetailArr = [];
for (let i = 0; i < details.priceMethodType.length; i++) { for (let i = 0; i < details.priceMethodType.length; i++) {
const value = details.priceMethodType[i]; const value = details.priceMethodType[i];
console.log(value,'value'); if (value.dictKey != '2') {
const _itemObj = {
if(value.dictKey !='2'){ title: value.dictValue + '计费品类',
console.log(value,'value===='); code: value.dictKey,
_billTemplateDetailArr.push({ categories: [
title: value.dictValue + '计费品类', {
code: value.dictKey, reduce: false,
categories: [ plus: true,
{ goodsName: '',
reduce: false, goodsId: '',
plus: true, goods: '',
goodsName: '', goodsArr: [],
goodsId: '', loading: false,
goods: '', },
goodsArr: [], ],
loading: false, };
},
], if (!props.templateData.request) {
}); console.log('123123 :>> ', 123123);
} _billTemplateDetailArr.push(_itemObj);
continue;
}
console.log('222 :>> ', 222);
const _arr = [];
//
if (value.dictKey === '1') {
const { trunklinePieceCategorys } = props.templateData.request;
if (trunklinePieceCategorys && trunklinePieceCategorys.length !== 0) {
for (let i = 0; i < trunklinePieceCategorys.length; i++) {
const item = trunklinePieceCategorys[i];
_arr.push({
reduce: i === 0 ? false : true,
plus: true,
goodsName: item.name,
goodsId: item.id,
goods: item.name,
goodsArr: [],
loading: false,
});
}
_itemObj.categories = _arr;
}
}
//
if (value.dictKey === '4') {
const { trunklineWeightCategorys } = props.templateData.request;
if (trunklineWeightCategorys && trunklineWeightCategorys.length !== 0) {
for (let i = 0; i < trunklineWeightCategorys.length; i++) {
const item = trunklineWeightCategorys[i];
_arr.push({
reduce: i === 0 ? false : true,
plus: true,
goodsName: item.name,
goodsId: item.id,
goods: item.name,
goodsArr: [],
loading: false,
});
}
_itemObj.categories = _arr;
}
}
//
if (value.dictKey === '3') {
const { trunklineCubeCategorys } = props.templateData.request;
if (trunklineCubeCategorys && trunklineCubeCategorys.length !== 0) {
for (let i = 0; i < trunklineCubeCategorys.length; i++) {
const item = trunklineCubeCategorys[i];
_arr.push({
reduce: i === 0 ? false : true,
plus: true,
goodsName: item.name,
goodsId: item.id,
goods: item.name,
goodsArr: [],
loading: false,
});
}
_itemObj.categories = _arr;
}
}
_billTemplateDetailArr.push(_itemObj);
}
} }
console.log('_billTemplateDetailArr :>> ', _billTemplateDetailArr);
details.form.billTemplateDetail = _billTemplateDetailArr; details.form.billTemplateDetail = _billTemplateDetailArr;
}; };
@ -388,11 +464,28 @@ const initDictionaryBiz = async () => {
const [trunkLineResult, minCostResult] = await Promise.all([trunkLinePromise, minCostPromise]); const [trunkLineResult, minCostResult] = await Promise.all([trunkLinePromise, minCostPromise]);
await nextTick();
console.log('props.templateData.request :>> ', props.templateData.request);
if (Object.keys(props.templateData).length !== 0) {
details.form = deepClone(props.templateData.request);
details.form.trunklinePricingType = details.form.trunklinePricingType
? details.form.trunklinePricingType.split(',')
: [];
details.form.trunklineIsUnifyAreaBill += '';
details.form.trunklineIsByCategory += '';
details.form.trunklineIsPeculiarSetup += '';
details.form.trunklineIsMinCost += '';
details.form.trunklineMinCostType += '';
}
console.log('details.form :>> ', details.form);
// 线 // 线
handleTrunkLinePricingType(trunkLineResult); handleTrunkLinePricingType(trunkLineResult);
handleLowestPrice(minCostResult); handleLowestPrice(minCostResult);
// form
initFormData(); initFormData();
} catch (error) { } catch (error) {
console.log('error :>> ', error); console.log('error :>> ', error);
@ -402,7 +495,6 @@ const initDictionaryBiz = async () => {
initDictionaryBiz(); initDictionaryBiz();
/** 新增品类 */ /** 新增品类 */
const handlePlus = async (value: any, index: number) => { const handlePlus = async (value: any, index: number) => {
value.categories.splice(index + 1, 0, { value.categories.splice(index + 1, 0, {
@ -483,91 +575,100 @@ const resetFormData = () => {
}; };
/** 提交 */ /** 提交 */
const handleSubmit = async() => { const handleSubmit = async () => {
if (details.form.trunklinePricingType.length === 0) ElMessage.error('请选择计价方式'); if (details.form.trunklinePricingType.length === 0) ElMessage.error('请选择计价方式');
formRef.value.validate(async valid => { formRef.value.validate(async valid => {
await emit('request-data'); // await emit('request-data'); //
if (!valid) return; if (!valid) return;
console.log(props, 'props'); console.log(props, 'props');
if (!props.templateData.TemplateName) { if (!props.templateData.TemplateName) {
ElMessage({ ElMessage({
message: '请输入模板名称', message: '请输入模板名称',
type: 'warning', type: 'warning',
}); });
return; return;
} else { } else {
details.form.name = props.templateData.TemplateName; // details.form.name = props.templateData.TemplateName; //
} }
if (!props.templateData.brand) { if (!props.templateData.brand) {
ElMessage({ ElMessage({
message: '请选择品牌', message: '请选择品牌',
type: 'warning', type: 'warning',
}); });
return; return;
} else { } else {
details.form.brandId = props.templateData.brand; //ID details.form.brandId = props.templateData.brand; //ID
} }
details.form.serviceType=props.templateData.ServiceType.join(',');// details.form.serviceType = props.templateData.ServiceType.join(','); //
console.log(details.form,'初始表单'); console.log(details.form, '初始表单');
const submitData = deepClone(details.form);// const submitData = deepClone(details.form); //
// //
submitData.trunklinePricingType= submitData.trunklinePricingType.join(',') submitData.trunklinePricingType = submitData.trunklinePricingType.join(',');
// //
// //
if(details.form.trunklineIsByCategory === '1'){ if (details.form.trunklineIsByCategory === '1') {
submitData.billTemplateDetail.forEach(item=>{ submitData.billTemplateDetail.forEach(item => {
switch (item.code) { switch (item.code) {
case '1': case '1':
submitData.trunklinePieceCategory = item.categories.filter(res => res.goodsId).map(res => res.goodsId).join(','); submitData.trunklinePieceCategory = item.categories
break; .filter(res => res.goodsId)
case '3': .map(res => res.goodsId)
submitData.trunklineCubeCategory = item.categories.filter(res => res.goodsId).map(res => res.goodsId).join(','); .join(',');
break; break;
case '4': case '3':
submitData.trunklineWeightCategory = item.categories.filter(res => res.goodsId).map(res => res.goodsId).join(','); submitData.trunklineCubeCategory = item.categories
break; .filter(res => res.goodsId)
default: .map(res => res.goodsId)
break; .join(',');
} break;
}) case '4':
submitData.trunklineWeightCategory = item.categories
.filter(res => res.goodsId)
.map(res => res.goodsId)
.join(',');
break;
default:
break;
}
});
} }
delete submitData.billTemplateDetail;// delete submitData.billTemplateDetail; //
console.log(submitData,'处理好的参数'); console.log(submitData, '处理好的参数');
if(props.templateData.code){ if (props.templateData.code) {
let data={ let data = {
checkType:'2', checkType: '2',
...submitData,// ...submitData, //
id:props.templateData.code,// id: props.templateData.code, //
} };
// //
$_putpriceTemplate(data).then(res=>{ $_putpriceTemplate(data).then(res => {
console.log(res,'编辑成功之后返回值'); console.log(res, '编辑成功之后返回值');
if (res.data.code == 200) { if (res.data.code == 200) {
ElMessage({ ElMessage({
message: res.data.msg, message: res.data.msg,
type: 'success', type: 'success',
}) });
} }
}) });
}else{ } else {
// //
let data={ let data = {
...submitData,// ...submitData, //
} };
$_priceTemplate(data).then(res=>{ $_priceTemplate(data).then(res => {
console.log(res,'提交成功返回值'); console.log(res, '提交成功返回值');
if (res.data.code == 200) { if (res.data.code == 200) {
ElMessage({ ElMessage({
message: res.data.msg, message: res.data.msg,
type: 'success', type: 'success',
});
emit('request-data', res.data.data); //
}
}); });
emit('request-data',res.data.data);//
}
})
} }
}); });
}; };

1
src/views/financialsector/Financialse/FinancialWarehousing.vue

@ -95,7 +95,6 @@
:remote-method="categoriesearch" :remote-method="categoriesearch"
@focus="categoriesSearchfocus(item)" @focus="categoriesSearchfocus(item)"
> >
<!-- @remote-method="changeCategory(item.warehousePieceCategory)" -->
<el-option <el-option
v-for="items in item.Additionalcategories" v-for="items in item.Additionalcategories"
:key="items.value" :key="items.value"

Loading…
Cancel
Save