Browse Source

客户新增默认付款方式

dev-xx
qb 1 year ago
parent
commit
1b9ad4b2ed
  1. 10
      src/option/distribution/BookingNote.js
  2. 2
      src/option/waybill/WarehousingByTrainNumber.js
  3. 286
      src/views/basicdata/brand/basicClient.vue
  4. 22
      src/views/waybill/CreateZeroOrder.vue
  5. 113
      src/views/waybill/TemporaryStorageList.vue
  6. 104
      src/views/waybill/WarehousingByTrainNumber.vue

10
src/option/distribution/BookingNote.js

@ -136,7 +136,7 @@ export const ChangeOrderColumnList = [
head: false,
},
{
prop: 'unloadNumber',
prop: 'operationRemark',
label: '修改内容',
type: 1,
values: '',
@ -146,7 +146,7 @@ export const ChangeOrderColumnList = [
sortable: true,
},
{
prop: 'NumberOfPiecesInTheCar',
prop: 'createTime',
label: '申请时间',
type: 1,
values: '',
@ -156,7 +156,7 @@ export const ChangeOrderColumnList = [
sortable: true,
},
{
prop: 'unloadNumber',
prop: 'warehouseName',
label: '申请网点',
type: 1,
values: '',
@ -166,7 +166,7 @@ export const ChangeOrderColumnList = [
sortable: true,
},
{
prop: 'NumberOfPiecesInTheCar',
prop: 'createUserName',
label: '申请人',
type: 1,
values: '',
@ -176,7 +176,7 @@ export const ChangeOrderColumnList = [
sortable: true,
},
{
prop: 'unloadNumber',
prop: 'aaa',
label: '修改原因',
type: 1,
values: '',

2
src/option/waybill/WarehousingByTrainNumber.js

@ -16,7 +16,7 @@ export const columnList = [
fixed: true,
},
{
prop: 'billladingCode',
prop: 'orderCode',
label: '订单自编号',
type: 1,
values: '',

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

@ -287,6 +287,16 @@
<el-form-item label="详细地址" prop="detailedly">
<el-input v-model="form.detailedly" placeholder="请填写详细地址" style="width: 100%" />
</el-form-item>
<el-form-item label="默认付款方式" prop="defaultPaymentMethods">
<el-select v-model="form.defaultPaymentMethods" placeholder="请选择默认付款方式">
<el-option
v-for="item in defaultPaymentMethodsOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="三方商城" prop="tripartiteMall">-->
<!-- <el-input v-model="form.tripartiteMall" placeholder="请填写三方商城" style="width: 100%" />-->
<!-- </el-form-item>-->
@ -319,7 +329,7 @@
:limit="3"
:on-exceed="handleExceed"
>
<el-button>上传</el-button>
<el-button type="Primary" icon="Position">上传</el-button>
<template #tip>
<div class="el-upload__tip">大小不超过500KB的jpg/png文件</div>
</template>
@ -333,35 +343,23 @@
/>
</el-form-item>
<el-form-item label="合同开始时间" prop="contractStartTime" label-width="120px">
<!-- <el-input v-model="form.contractStartTime" placeholder="请输入合同开始时间"/>-->
<div class="demo-date-picker" style="width: 60%">
<div class="block">
<!-- <span class="demonstration">Default</span>-->
<el-date-picker
v-model="form.contractStartTime"
type="date"
placeholder="选择时间"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</div>
</div>
<el-date-picker
v-model="form.contractStartTime"
type="date"
placeholder="选择时间"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</el-form-item>
<el-form-item label="合同结束时间" prop="contractEntTime" label-width="120px">
<!-- <el-input v-model="form.contractEntTime" placeholder="请输入合同结束时间"/>-->
<div class="demo-date-picker">
<div class="block">
<!-- <span class="demonstration">Default</span>-->
<el-date-picker
v-model="form.contractEntTime"
type="date"
placeholder="选择时间"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</div>
</div>
<el-date-picker
v-model="form.contractEntTime"
type="date"
placeholder="选择时间"
format="YYYY/MM/DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</el-form-item>
</el-form>
<!-- 表单按钮 -->
@ -756,24 +754,26 @@ export default {
{ required: true, message: '请输入客户名称', trigger: 'blur' },
// { min: 3, max: 5, message: ' 3 5 ', trigger: 'blur' }
],
typeService: [{ required: true, message: '请选择客户端类型', trigger: 'blur' }],
typeService: [{ required: true, message: '请选择客户端类型', trigger: ['blur', 'change'] }],
businessType: [
{ required: true, message: '请选择配送业务类型', trigger: 'change' },
// { min: 3, max: 5, message: ' 3 5 ', trigger: 'blur' }
// { min: 3, max: 5, message: ' 3 5 ', trigger: ['blur', 'change'] }
],
clientType: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
typeServiceList: [{ required: true, message: '请选择服务类型', trigger: 'change' }],
linkman: [{ required: true, message: '请填写联系人', trigger: 'blur' }],
detailedly: [{ required: true, message: '请填写详细地址', trigger: 'blur' }],
phone: [{ required: true, message: '请填写联系电话', trigger: 'blur' }],
contractEntTime: [
{ type: 'date', required: true, message: '请选择合同结束时间', trigger: 'change' },
],
contractStartTime: [
{ type: 'date', required: true, message: '请选择合同开始时间', trigger: 'change' },
],
linkman: [{ required: true, message: '请填写联系人', trigger: ['blur', 'change'] }],
detailedly: [{ required: true, message: '请填写详细地址', trigger: ['blur', 'change'] }],
phone: [{ required: true, message: '请填写联系电话', trigger: ['blur', 'change'] }],
// contractEntTime: [
// { type: 'date', required: true, message: '', trigger: 'change' },
// ],
// contractStartTime: [
// { type: 'date', required: true, message: '', trigger: 'change' },
// ],
bladeRegionProvinceId: [{ required: true, message: '请选择地址', trigger: 'change' }],
// leaseAccessories: [{ required: true, message: '', trigger: 'blur' }],
defaultPaymentMethods: [
{ required: true, message: '请选择默认付款方式', trigger: 'change' },
],
},
bianji: false,
@ -782,6 +782,29 @@ export default {
name: '',
phone: '',
},
/** 付款方式 */
defaultPaymentMethodsOptions: [
{
value: '1',
label: '现付',
},
{
value: '2',
label: '到付',
},
{
value: '3',
label: '月结',
},
{
value: '4',
label: '回付',
},
{
value: '5',
label: '内部结算',
},
],
};
},
created() {},
@ -1218,6 +1241,10 @@ export default {
this.box = true;
this.distriType = false;
this.viewClientEntd = false;
this.$nextTick(() => {
this.$refs.form.resetFields();
this.form.defaultPaymentMethods = '1';
});
},
handleAddSon(row) {
console.log(row);
@ -1455,102 +1482,104 @@ export default {
this.query.bladeRegionAreaId = this.query.bladeRegionProvinceId[2];
this.query.bladeRegionProvinceId = this.query.bladeRegionProvinceId[0];
}
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
console.log(data);
getList(page.currentPage, page.pageSize, Object.assign(params, this.query))
.then(res => {
const data = res.data.data;
console.log(data);
data.records.forEach(i => {
let ke = this.clientType.find(kh => parseInt(kh.dictKey) == parseInt(i.clientType));
// console.log("<><><>",ke);
if (!!ke) {
i.clientTypeName = ke.dictValue;
// console.log('==-=-=', i.clientType, ke.dictKey, ke.dictValue);
}
if (!i.clientType) {
i.clientTypeName = '无';
}
let typeServiceName = [];
data.records.forEach(i => {
let ke = this.clientType.find(kh => parseInt(kh.dictKey) == parseInt(i.clientType));
// console.log("<><><>",ke);
if (!!ke) {
i.clientTypeName = ke.dictValue;
// console.log('==-=-=', i.clientType, ke.dictKey, ke.dictValue);
}
if (!i.clientType) {
i.clientTypeName = '无';
}
let typeServiceName = [];
if (!i.typeServiceBusiness) {
i.typeServiceName = '无';
} else {
i.typeServiceBusiness.forEach(ty => {
let fuw = this.freightType.find(
fw => parseInt(fw.dictKey) == parseInt(ty.typeService)
);
if (!!fuw) {
// console.log("fuw",fuw);
typeServiceName.push(fuw.dictValue);
// console.log('==-=-=', i.typeService, fuw.dictKey, fuw.dictValue);
}
});
i.typeServiceNameFy = typeServiceName.join(',');
}
});
//
// let dz = '';
// data.records.forEach(it => {
// let arrsheng = this.optioner.filter(i => {
// return it.bladeRegionProvinceId == i.value;
// });
// if (arrsheng.length == 0) return;
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
// let arrshi = arrsheng[0].children.filter(i => {
// return it.bladeRegionCityId == i.value;
// });
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
// let arrqu = arrshi[0].children.filter(i => {
// return it.bladeRegionAreaId == i.value;
// });
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
// dz =
// arrsheng[0].label +
// (arrshi[0].label ? `/${arrshi[0].label}` : ``) +
// (arrqu[0]?.label ? `/${arrqu[0]?.label}` : '');
// it.bladeRegionProvinceId = dz;
// });
//
let dz = '';
data.records.forEach(it => {
let arrsheng = this.optioner.filter(i => {
return it.bladeRegionProvinceId == i.value;
if (!i.typeServiceBusiness) {
i.typeServiceName = '无';
} else {
i.typeServiceBusiness.forEach(ty => {
let fuw = this.freightType.find(
fw => parseInt(fw.dictKey) == parseInt(ty.typeService)
);
if (!!fuw) {
// console.log("fuw",fuw);
typeServiceName.push(fuw.dictValue);
// console.log('==-=-=', i.typeService, fuw.dictKey, fuw.dictValue);
}
});
i.typeServiceNameFy = typeServiceName.join(',');
}
});
let shengLabel = arrsheng.length > 0 ? arrsheng[0].label : ''; //
//
// let dz = '';
// data.records.forEach(it => {
// let arrsheng = this.optioner.filter(i => {
// return it.bladeRegionProvinceId == i.value;
// });
// if (arrsheng.length == 0) return;
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
// let arrshi = arrsheng[0].children.filter(i => {
// return it.bladeRegionCityId == i.value;
// });
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
// let arrqu = arrshi[0].children.filter(i => {
// return it.bladeRegionAreaId == i.value;
// });
if (arrsheng.length === 0) {
it.bladeRegionProvinceId = shengLabel; //
return;
}
// // console.log("========",JSON.parse(JSON.stringify(arrsheng)) );
// dz =
// arrsheng[0].label +
// (arrshi[0].label ? `/${arrshi[0].label}` : ``) +
// (arrqu[0]?.label ? `/${arrqu[0]?.label}` : '');
// it.bladeRegionProvinceId = dz;
// });
//
let dz = '';
data.records.forEach(it => {
let arrsheng = this.optioner.filter(i => {
return it.bladeRegionProvinceId == i.value;
});
let shengLabel = arrsheng.length > 0 ? arrsheng[0].label : ''; //
let arrshi = arrsheng[0].children.filter(i => {
return it.bladeRegionCityId == i.value;
});
let shiLabel = arrshi.length > 0 ? arrshi[0].label : ''; //
if (arrsheng.length === 0) {
it.bladeRegionProvinceId = shengLabel; //
return;
}
if (arrshi.length === 0) {
dz = shengLabel; //
} else {
let arrqu = arrshi[0].children.filter(i => {
return it.bladeRegionAreaId == i.value;
let arrshi = arrsheng[0].children.filter(i => {
return it.bladeRegionCityId == i.value;
});
let shiLabel = arrshi.length > 0 ? arrshi[0].label : ''; //
let quLabel = arrqu.length > 0 ? arrqu[0].label : ''; //
if (arrshi.length === 0) {
dz = shengLabel; //
} else {
let arrqu = arrshi[0].children.filter(i => {
return it.bladeRegionAreaId == i.value;
});
dz = shengLabel + (shiLabel ? `/${shiLabel}` : '') + (quLabel ? `/${quLabel}` : '');
}
let quLabel = arrqu.length > 0 ? arrqu[0].label : ''; //
it.bladeRegionProvinceId = dz;
dz = shengLabel + (shiLabel ? `/${shiLabel}` : '') + (quLabel ? `/${quLabel}` : '');
}
it.bladeRegionProvinceId = dz;
});
this.page.total = data.total;
this.data = data.records;
this.data = this.$functions.newdatas(this.columnList, this.data);
this.loading = false;
this.selectionClear();
})
.catch(() => {
this.data = [];
this.loading = false;
});
this.page.total = data.total;
this.data = data.records;
this.data = this.$functions.newdatas(this.columnList, this.data);
this.loading = false;
this.selectionClear();
}).catch(()=>{
this.data =[]
this.loading = false;
});
},
},
};
@ -1577,4 +1606,13 @@ export default {
:deep(.el-cascader) {
width: 100%;
}
:deep(.el-date-editor.el-input) {
height: 100% !important;
width: 100% !important;
}
:deep(.el-select) {
width: 100% !important;
}
</style>

22
src/views/waybill/CreateZeroOrder.vue

@ -1764,22 +1764,22 @@ let _ant1 = null;
const remoteMethod = val => {
if (_ant1) clearTimeout(_ant1);
_ant1 = setTimeout(async () => {
if (val) {
try {
details.loadingObj.loading = true;
const res = await getOpenOrderAdvanceFindWarehouseList({ warehouseName: val });
const { data, code } = res.data;
if (code !== 200) return;
details.options = data || [];
} catch (error) {
} finally {
details.loadingObj.loading = false;
}
try {
details.loadingObj.loading = true;
const res = await getOpenOrderAdvanceFindWarehouseList({ warehouseName: val });
const { data, code } = res.data;
if (code !== 200) return;
details.options = data || [];
} catch (error) {
} finally {
details.loadingObj.loading = false;
}
clearTimeout(_ant1);
}, 1000);
};
remoteMethod('');
/** 目的仓选择时给目的仓名称赋值 */
const destinationWarehouseNameChange = val => {
details.query.destinationWarehouseName = details.options.find(

113
src/views/waybill/TemporaryStorageList.vue

@ -311,27 +311,25 @@
</el-form>
</div>
<template #footer>
<div class="flex-c-c dialog-footer">
<el-button
icon="Position"
type="primary"
:loading="details.loadingObj.addTagLoading"
@click="handleSubmitAddTag(ruleFormRef)"
>
</el-button>
<el-button
icon="Refresh"
type="primary"
:loading="details.loadingObj.addTagLoading"
@click="handleRefreshAddTag(ruleFormRef)"
>
</el-button>
<el-button icon="Close" @click="details.popUpShow.addTagVisited = false"> </el-button>
</div>
</template>
<div class="flex-c-c dialog-footer">
<el-button icon="Close" @click="details.popUpShow.addTagVisited = false"> </el-button>
<el-button
icon="Refresh"
type="primary"
:loading="details.loadingObj.addTagLoading"
@click="() => handleRefreshAddTag(ruleFormRef)"
>
</el-button>
<el-button
icon="Position"
type="primary"
:loading="details.loadingObj.addTagLoading"
@click="() => handleSubmitAddTag(ruleFormRef)"
>
</el-button>
</div>
</el-dialog>
<!-- 导入 -- 批量开标签 -->
@ -1237,50 +1235,63 @@ const handleClose = res => {
};
/** 开标签提交 */
const handleSubmitAddTag = async (formEl: FormInstance | undefined) => {
const handleSubmitAddTag = (formEl: FormInstance | undefined) => {
if (!formEl) return;
await formEl.validate(async (valid, fields) => {
if (valid) {
console.log('submit!');
console.log('details.addTagForm :>> ', details.addTagForm);
try {
if (details.addTagForm.area.length < 2) return ElMessage.warning('区域最少选择到市');
details.loadingObj.addTagLoading = true;
const res = await postOpenLabel({
...details.addTagForm,
area: details.addTagForm.area.join(','),
});
const { code } = res.data;
if (code !== 200) return;
ElMessage.success('添加成功');
details.popUpShow.addTagVisited = false;
initOnLoad({}, true);
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.addTagLoading = false;
formEl.validate((valid, fields) => {
ElMessageBox.confirm('确认提交吗?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(async () => {
if (valid) {
console.log('submit!');
console.log('details.addTagForm :>> ', details.addTagForm);
try {
if (details.addTagForm.area.length < 2) return ElMessage.warning('区域最少选择到市');
details.loadingObj.addTagLoading = true;
const res = await postOpenLabel({
...details.addTagForm,
area: details.addTagForm.area.join(','),
});
const { code } = res.data;
if (code !== 200) return;
ElMessage.success('添加成功');
details.popUpShow.addTagVisited = false;
initOnLoad({}, true);
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.addTagLoading = false;
}
} else {
console.log('error submit!', fields);
}
} else {
console.log('error submit!', fields);
}
});
});
};
/** 开标签重置 */
const handleRefreshAddTag = (formEl: FormInstance | undefined) => {
console.log('123123 :>> ', 123123);
if (!formEl) return;
formEl.resetFields();
ElMessageBox.confirm('确认重置吗?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
formEl.resetFields();
});
};
/** 开启开标签弹窗 */
const handleOpenAddTagDlog = () => {
details.popUpShow.addTagVisited = true;
handleRefreshAddTag(ruleFormRef.value);
ruleFormRef.value.resetFields();
};
onActivated(() => {

104
src/views/waybill/WarehousingByTrainNumber.vue

@ -1,6 +1,6 @@
<template>
<basic-container>
<div class="avue-crud">
<div class="avue-crud" v-loading="details.loadingObj.pageLoading">
<!-- 搜索模块 -->
<div v-h5uShow="!search">
<!-- 查询模块 -->
@ -32,7 +32,9 @@
<div class="avue-crud__header">
<!-- 头部左侧按钮模块 -->
<div class="avue-crud__left">
<el-button type="primary" icon="Van" @click="handlePutInStorage">批量入库</el-button>
<el-button type="primary" icon="Van" @click="handleBatchPutInStorage"
>批量入库</el-button
>
</div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -50,15 +52,24 @@
ref="tableNodeRef"
:columnList="details.columnList"
:tableData="details.data"
:loading="loadingObj.packageListLoading"
:loading="loadingObj.list"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
:isselectfun="handleIsSelect"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'"> </template>
<template v-if="slotProps.scope.column.label === '操作'">
<el-text
v-if="Number(slotProps.scope.row.isIncoming) === 1"
@click="handlePutInStorage(slotProps.scope)"
>
入库
</el-text>
<el-text @click="handleGoDetails(slotProps.scope)">包明细</el-text>
</template>
</template>
</tablecmt>
</el-row>
@ -152,7 +163,7 @@ const details = reactive<any>({
loadingObj: {
/** 列表加载loading */
list: false,
packageListLoading: false,
pageLoading: false,
},
/** 列表复选框选中的数据 */
selectionList: [],
@ -222,9 +233,10 @@ const searchChange = () => {
/** 清空表单 */
const searchReset = () => {
details.query = {};
details.stockupDate = [];
details.page.currentPage = 1;
onLoad();
details.data = [];
for (let i = 0; i < details.columnList.length; i++) {
details.columnList[i].values = '';
}
};
/** 展开列表控件 */
@ -242,6 +254,7 @@ const searchHide = () => {
/** 表格表头输入框搜索 */
const inputsc = (index, row) => {
details.query[row.prop] = index;
if (!index) delete details.query[row.prop];
onLoad();
};
@ -295,20 +308,83 @@ const setnewcolum = (newarr, headarr, type) => {
};
/** 入库 */
const handlePutInStorage = row => {
const handlePutInStorage = ({ row }) => {
ElMessageBox.confirm('确认批量入库吗?', '警告', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(async () => {
try {
details.loadingObj.pageLoading = true;
const res = await postIncomingBatchOrder({
advanceIds: [row.id],
incomingType: details.searchType === 'orderCode' ? 5 : 4,
});
const { code, msg } = res.data;
if (code !== 200) return;
ElMessage.success(msg);
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
})
.catch(() => {});
};
/** 批量入库 */
const handleBatchPutInStorage = () => {
if (!details.selectionList.length) return ElMessage.error('请选择需要入库的数据');
ElMessageBox.confirm('确认批量入库吗?', '警告', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
ElMessage({
type: 'success',
message: '入库成功',
});
.then(async () => {
try {
details.loadingObj.pageLoading = true;
const res = await postIncomingBatchOrder({
advanceIds: details.selectionList.map(val => val.id),
incomingType: details.searchType === 'orderCode' ? 5 : 4,
});
const { code, msg } = res.data;
if (code !== 200) return;
ElMessage.success(msg);
onLoad();
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.pageLoading = false;
}
})
.catch(() => {});
};
/** 详情 */
const handleGoDetails = ({ row }) => {
$router.push({
path: '/waybill/orderPackageListDetails?name=包明细',
query: {
id: row.id,
name: `订单 -- ${row.orderCode} 包明细`,
},
});
};
const handleIsSelect = val => {
if (Number(val.isIncoming) === 1) {
return true;
} else {
return false;
}
};
</script>
<style scoped lang="scss">

Loading…
Cancel
Save