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 => {

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

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

@ -183,7 +183,7 @@
<P>请确认传入的文件为Excel文件格式</P>
<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"
>
<el-button type="primary" icon="Download"> 点击下载 </el-button>

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

@ -185,7 +185,7 @@
</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 v-html="html"></div>
</div>
@ -194,7 +194,7 @@
<el-button type="primary" @click="handleExport"> </el-button>
<el-button @click="isShow = false"> </el-button>
</span>
</el-dialog>
</el-dialog> -->
</div>
<el-dialog
@ -284,6 +284,9 @@
</template>
</el-dialog>
</basic-container>
<MyPrint :html="html" v-model="isShow" width="70%"></MyPrint>
<edittablehead
@setcolum="setnewcolum"
@closce="showdrawer"

172
src/views/financialsector/FinanceHome.vue

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

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

@ -173,9 +173,6 @@ const props = defineProps({
templateData: Object,
});
console.log('props.templateData :>> ', props.templateData);
console.log(props, '来自父页面参数');
const instance = getCurrentInstance();
/** 表单实例 */
@ -294,8 +291,6 @@ const goriesloading = ref(false);
/** 计价方式改变时 */
const handleChangePrcieMethod = value => {
console.log('value :>> ', value);
let activeItem: any = {};
for (let i = 0; i < details.lowestType.length; i++) {
const item = details.lowestType[i];
@ -317,13 +312,11 @@ const handleTrunkLinePricingType = response => {
details.priceMethodType = data || [];
if (props.templateData) return;
const _billTemplateDetailArr = [];
for (let i = 0; i < details.priceMethodType.length; i++) {
const value = details.priceMethodType[i];
if (value.dictKey != '2') {
_billTemplateDetailArr.push({
const _itemObj = {
title: value.dictValue + '计费品类',
code: value.dictKey,
categories: [
@ -337,15 +330,84 @@ const handleTrunkLinePricingType = response => {
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 => {
console.log('response :>> ', response);
const { code, data } = response.data;
if (code !== 200) return;
@ -378,20 +439,19 @@ const initDictionaryBiz = async () => {
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 = 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.pickupMinCostType += '';
details.form.pickupIsUnifyAreaBill += '';
details.form.pickupIsMinCost += '';
}
console.log('details.form :>> ', details.form);
// 线
handleTrunkLinePricingType(trunkLineResult);
handleLowestPrice(minCostResult);
@ -426,7 +486,6 @@ const handlePlus = async (value: any, index: number) => {
await nextTick();
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 => {
if (!valid) return;
await emit('request-data'); //
console.log(props, 'props');
if (!props.templateData.TemplateName) {
ElMessage({
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_idNumber">{{ index+1 }}</div>
<div class="el_table_idNumber">{{ index + 1 }}</div>
<el-select
:ref="value.title + index"
class="el_Cselect"
@ -171,11 +171,11 @@
</template>
<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 { ElMessage, ElMessageBox } from 'element-plus';
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';
const emit = defineEmits(['request-data']);
defineComponent({
@ -332,29 +332,105 @@ const handleTrunkLinePricingType = response => {
const _billTemplateDetailArr = [];
for (let i = 0; i < details.priceMethodType.length; i++) {
const value = details.priceMethodType[i];
console.log(value,'value');
if(value.dictKey !='2'){
console.log(value,'value====');
_billTemplateDetailArr.push({
title: value.dictValue + '计费品类',
code: value.dictKey,
categories: [
{
reduce: false,
plus: true,
goodsName: '',
goodsId: '',
goods: '',
goodsArr: [],
loading: false,
},
],
});
}
if (value.dictKey != '2') {
const _itemObj = {
title: value.dictValue + '计费品类',
code: value.dictKey,
categories: [
{
reduce: false,
plus: true,
goodsName: '',
goodsId: '',
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;
};
@ -388,11 +464,28 @@ const initDictionaryBiz = async () => {
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);
handleLowestPrice(minCostResult);
// form
initFormData();
} catch (error) {
console.log('error :>> ', error);
@ -402,7 +495,6 @@ const initDictionaryBiz = async () => {
initDictionaryBiz();
/** 新增品类 */
const handlePlus = async (value: any, index: number) => {
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('请选择计价方式');
formRef.value.validate(async valid => {
await emit('request-data'); //
if (!valid) return;
console.log(props, 'props');
if (!props.templateData.TemplateName) {
ElMessage({
message: '请输入模板名称',
type: 'warning',
});
return;
} else {
details.form.name = props.templateData.TemplateName; //
}
console.log(props, 'props');
if (!props.templateData.TemplateName) {
ElMessage({
message: '请输入模板名称',
type: 'warning',
});
return;
} else {
details.form.name = props.templateData.TemplateName; //
}
if (!props.templateData.brand) {
ElMessage({
message: '请选择品牌',
type: 'warning',
});
return;
} else {
details.form.brandId = props.templateData.brand; //ID
}
if (!props.templateData.brand) {
ElMessage({
message: '请选择品牌',
type: 'warning',
});
return;
} else {
details.form.brandId = props.templateData.brand; //ID
}
details.form.serviceType=props.templateData.ServiceType.join(',');//
console.log(details.form,'初始表单');
const submitData = deepClone(details.form);//
details.form.serviceType = props.templateData.ServiceType.join(','); //
console.log(details.form, '初始表单');
const submitData = deepClone(details.form); //
//
submitData.trunklinePricingType= submitData.trunklinePricingType.join(',')
submitData.trunklinePricingType = submitData.trunklinePricingType.join(',');
//
//
if(details.form.trunklineIsByCategory === '1'){
submitData.billTemplateDetail.forEach(item=>{
switch (item.code) {
case '1':
submitData.trunklinePieceCategory = item.categories.filter(res => res.goodsId).map(res => res.goodsId).join(',');
break;
case '3':
submitData.trunklineCubeCategory = item.categories.filter(res => res.goodsId).map(res => res.goodsId).join(',');
break;
case '4':
submitData.trunklineWeightCategory = item.categories.filter(res => res.goodsId).map(res => res.goodsId).join(',');
break;
default:
break;
}
})
if (details.form.trunklineIsByCategory === '1') {
submitData.billTemplateDetail.forEach(item => {
switch (item.code) {
case '1':
submitData.trunklinePieceCategory = item.categories
.filter(res => res.goodsId)
.map(res => res.goodsId)
.join(',');
break;
case '3':
submitData.trunklineCubeCategory = item.categories
.filter(res => res.goodsId)
.map(res => res.goodsId)
.join(',');
break;
case '4':
submitData.trunklineWeightCategory = item.categories
.filter(res => res.goodsId)
.map(res => res.goodsId)
.join(',');
break;
default:
break;
}
});
}
delete submitData.billTemplateDetail;//
console.log(submitData,'处理好的参数');
if(props.templateData.code){
let data={
checkType:'2',
...submitData,//
id:props.templateData.code,//
}
delete submitData.billTemplateDetail; //
console.log(submitData, '处理好的参数');
if (props.templateData.code) {
let data = {
checkType: '2',
...submitData, //
id: props.templateData.code, //
};
//
$_putpriceTemplate(data).then(res=>{
console.log(res,'编辑成功之后返回值');
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
})
}
})
}else{
$_putpriceTemplate(data).then(res => {
console.log(res, '编辑成功之后返回值');
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
});
}
});
} else {
//
let data={
...submitData,//
}
$_priceTemplate(data).then(res=>{
console.log(res,'提交成功返回值');
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
type: 'success',
let data = {
...submitData, //
};
$_priceTemplate(data).then(res => {
console.log(res, '提交成功返回值');
if (res.data.code == 200) {
ElMessage({
message: res.data.msg,
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"
@focus="categoriesSearchfocus(item)"
>
<!-- @remote-method="changeCategory(item.warehousePieceCategory)" -->
<el-option
v-for="items in item.Additionalcategories"
:key="items.value"

Loading…
Cancel
Save