Browse Source

零担补录

pre-production
qb 1 year ago
parent
commit
bfef269ca1
  1. 3
      src/components/tablecmt/tablecmt.vue
  2. 143
      src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue
  3. 4
      src/views/distribution/inventory/distrilbutionBillLading.vue
  4. 2029
      src/views/distribution/stockup/distributionStockupDetails.vue

3
src/components/tablecmt/tablecmt.vue

@ -293,7 +293,8 @@ let props = defineProps({
},
loading: {
type: Boolean as PropType<boolean>,
required: true,
required: false,
default: false,
},
//
checkselect: {

143
src/views/distribution/inventory/addArteryDistrilbutionBillLadingList.vue

@ -238,10 +238,12 @@
<div class="add_row">
<!-- 列表模块 -->
<div style="width: 49%">
<!-- 标题 -->
<el-divider content-position="left">
<span>运单池</span>
</el-divider>
<!-- 控件 -->
<div class="flex-c-sb">
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="handleRefresh(1)" circle></el-button>
@ -253,6 +255,7 @@
<el-icon><CaretRight /></el-icon>
</el-button>
</div>
<!-- 表格 -->
<tablecmt
class="tableNode mt10"
@ -290,9 +293,12 @@
<!-- 列表模块 -->
<div style="width: 49%">
<!-- 标题 -->
<el-divider content-position="left">
<span>调度池</span>
</el-divider>
<!-- 控件 -->
<div class="flex-c-sb">
<el-button type="text" class="pointer" @click="handleRemoveWaybill">
<el-icon><CaretLeft /></el-icon>
@ -304,19 +310,24 @@
<el-button icon="el-icon-search" @click="searchHide" circle></el-button>
</div>
</div>
<!-- 表格 -->
<tablecmt
class="tableNode mt10"
:columnList="details.columnNewList"
:tableData="details.addInfo.newData"
:loading="details.loadingObj.newListLoading"
:loading="details.loadingObj.newlistLoading"
@inputTxt="inputsc"
@timeCheck="timesc"
@selectCheck="selectsc"
@selection="list => selectionChange(list, 2)"
>
</tablecmt>
<!-- 统计行 -->
<div class="statistics_row">
<div>合计: 选择数: {{ details.addInfo.oldSelectionList.length }}</div>
<div>合计: 总数: {{ details.addInfo.newData.length }}</div>
<div>选择数: {{ details.addInfo.newSelectionList.length }}</div>
</div>
</div>
</div>
@ -325,7 +336,12 @@
<div v-if="!details.view" class="footerBtn">
<el-button icon="el-icon-circle-close" @click="back"> </el-button>
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit(ruleFormRef)">
<el-button
type="primary"
:loading="details.loadingObj.submitBtnLoading"
icon="el-icon-circle-check"
@click="handleSubmit(ruleFormRef)"
>
</el-button>
</div>
@ -418,7 +434,8 @@ const details = reactive({
/** 调度池 */
newlistLoading: false,
/** 节点下拉框 */
nodeLoading: false,
nodeLoading: false,,
submitBtnLoading: false
},
//
view: false,
@ -473,8 +490,6 @@ const details = reactive({
/** 是否是新增 */
isNew: true,
},
/** 节点信息 */
nodeInfoData: [{ nodeName: '' }, { nodeName: '' }],
/** 字典 */
clientType: [],
/** 时间 */
@ -519,6 +534,7 @@ const details = reactive({
waybillNosList: [],
});
/** 节点信息 */
const nodeInfoData = reactive([{ nodeName: '' }, { nodeName: '' }]);
/** 激活位置 */
@ -531,12 +547,16 @@ const initData = async () => {
nodeInfoData[0] = {
nodeName: data.startWarehouseInfo.warehouseName,
nodeId: data.startWarehouseInfo.warehouseId,
clientId: data.startWarehouseInfo.warehouseId,
clientName: data.startWarehouseInfo.warehouseName,
...data.startWarehouseInfo,
};
nodeInfoData[nodeInfoData.length - 1] = {
nodeName: data.startWarehouseInfo.warehouseName,
nodeId: data.startWarehouseInfo.warehouseId,
clientId: data.startWarehouseInfo.warehouseId,
clientName: data.startWarehouseInfo.warehouseName,
...data.startWarehouseInfo,
};
@ -659,6 +679,8 @@ const searchReset = () => {
const handleRefresh = type => {
if (type === 1) onLoad(true);
else {
details.addInfo.newData = [];
details.waybillNosList = [];
onLoad(true);
}
};
@ -796,7 +818,16 @@ const handleCarrierChange = () => {
};
/** 选择节点 */
const destinationWarehouseNameChange = (val, index) => {};
const destinationWarehouseNameChange = (val, index) => {
const _node = nodeInfoData[index];
const _value = details.options.find(value => value.clientId === val);
_node.clientId = _value ? _value.clientId : '';
_node.clientName = _value ? _value.clientName : '';
_node.linkMan = _value ? _value.linkMan : '';
_node.linkPhone = _value ? _value.linkPhone : '';
_node.linkAddress = _value ? _value.linkAddress : '';
};
/** 关闭页面 */
const back = () => {
@ -826,7 +857,22 @@ const handleAddWaybill = () => {
};
/** 从调度池中移除运单 */
const handleRemoveWaybill = () => {};
const handleRemoveWaybill = () => {
if (details.addInfo.newSelectionList.length === 0) return ElMessage.warning('请选择运单');
const _copyNewData = details.addInfo.newData;
for (let item of details.addInfo.newSelectionList) {
const _itemIndex = _copyNewData.indexOf(item);
const _index = details.waybillNosList.indexOf(item.waybillNo);
if (_index !== -1) details.waybillNosList.splice(_index, 1);
if (_itemIndex !== -1) _copyNewData.splice(_itemIndex, 1);
}
details.addInfo.newData = _copyNewData;
onLoad(true);
};
/** 新增节点 */
const handleAddNode = index => {
@ -838,27 +884,55 @@ const handleDelNode = index => {
nodeInfoData.splice(index, 1);
};
/** 新增提交 */
const addSubmit = async () => {
const _submitData = {
/**
* 节点数组
*/
const addSubmit = async nodeArr => {
try {
details.loadingObj.submitBtnLoading = true;
const _submitData = {
...details.form,
billladingWaybillList: [],
billladingLineList: [],
};
_submitData.billladingLineList = details.nodeInfoData.map((value, index) => {
return {
clientId: 31231312,
clientName: 'adasdasda',
clientType: '1',
linkMan: 'dsadasda',
linkPhone: 'dsadadas',
linkAddress: 'adsdadada',
sort: 1,
};
});
let _flag = false;
//
for (let i = 0; i < nodeArr.length; i++) {
const item = nodeArr[i];
if (!item.clientId && item.clientId !== 0) {
ElMessage.warning('存在有误节点, 请选择节点');
_flag = true;
break;
}
_submitData.billladingLineList.push({
clientType: '2',
...item,
sort: i + 1,
});
}
for (let item of details.addInfo.newData) {
_submitData.billladingWaybillList.push({
waybillId: item.id,
waybillNo: item.waybillNo,
});
}
//
if (_flag) return;
const res = await postSaveNew(_submitData);
console.log('_submitData :>> ', _submitData);
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.submitBtnLoading = false;
}
};
/** 修改提交 */
@ -869,8 +943,12 @@ const handleSubmit = async (formEl: FormInstance | undefined) => {
if (!formEl) return;
await formEl.validate((valid, fields) => {
if (valid) {
const _nodeArr = nodeInfoData.slice(1, nodeInfoData.length - 1);
if (_nodeArr.length === 0) return ElMessage.warning('请添加路线节点');
console.log('submit!');
addSubmit();
addSubmit(_nodeArr);
} else {
console.log('error submit!', fields);
}
@ -1037,27 +1115,30 @@ const handleSubmit = async (formEl: FormInstance | undefined) => {
:deep(.el-step__title.is-process) {
font-weight: bold;
--el-text-color-primary: #60df54;
--el-text-color-primary: #1a3061;
}
:deep(.el-step__head.is-process) {
--el-text-color-primary: #60df54;
--el-text-color-primary: #1a3061;
}
:deep(.el-step__title.is-process .count_icon) {
background: #60df54;
}
// :deep(.el-step__title.is-process .count_icon) {
// // background: #1a3061;
// }
.count_icon {
--width: 25px;
margin-right: 20px;
width: var(--width);
height: var(--width);
background: var(--el-color-primary);
// background: var(--el-color-primary);
color: #fff;
border-radius: 50%;
text-align: center;
font-weight: bold;
line-height: var(--width);
border: 1px solid var(--el-color-primary);
color: var(--el-color-primary);
}
.steps_title {
@ -1066,6 +1147,10 @@ const handleSubmit = async (formEl: FormInstance | undefined) => {
align-items: center;
}
:deep(.el-step) {
max-width: none !important;
}
//
:deep(.el-steps) {
flex-wrap: wrap;

4
src/views/distribution/inventory/distrilbutionBillLading.vue

@ -703,10 +703,10 @@ export default {
],
pickUpPlate: [{ required: true, message: '请输入提货车牌号', trigger: 'change' }],
deliveryDocument: [
{ required: true, message: '请输入提货证件码', trigger: 'change' },
{ required: false, message: '请输入提货证件码', trigger: 'change' },
// { min: 3, max: 5, message: ' 3 5 ', trigger: 'blur' }
],
certificateType: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
certificateType: [{ required: false, message: '请选择证件类型', trigger: 'change' }],
freightMark: [{ required: true, message: '请选择费用', trigger: 'change' }],
totalCost: [{ required: true, message: '请输入费用合计', trigger: 'change' }],
deliveryDocuments: [{ required: true, message: '请上传提货证件', trigger: 'change' }],

2029
src/views/distribution/stockup/distributionStockupDetails.vue

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save