Browse Source

新增无数据开单

dev-xx
qb 1 year ago
parent
commit
f423c6a06c
  1. 26
      src/api/distribution/CreateOrder.js
  2. 12
      src/components/ArteryPrintTemplate/ArteryPrintTemplate.vue
  3. 19
      src/components/SelectBox/SelectBox.vue
  4. 37
      src/components/tablecmt/tablecmt.vue
  5. 4
      src/router/views/index.js
  6. 3107
      src/utils/barcode.js
  7. 4
      src/views/distribution/artery/VehicleStowage.vue
  8. 2
      src/views/distribution/inventory/BookingNote.vue
  9. 193
      src/views/distribution/inventory/CreateOrder.vue
  10. 105
      src/views/waybill/CreateZeroOrder.vue
  11. 114
      src/views/waybill/TemporaryStorageList.vue

26
src/api/distribution/CreateOrder.js

@ -12,7 +12,7 @@ export const postOpenOrderAdvanceToWaybillInfo = data => {
};
/**
* 开单接口
* 有数据开单接口
*/
export const postOpenOrderOpenWaybill = data => {
return request({
@ -23,7 +23,18 @@ export const postOpenOrderOpenWaybill = data => {
};
/**
* 录单接口
* 无数据开单接口
*/
export const postOpenOrderOpenNoPackageWaybill = data => {
return request({
url: '/api/logpm-trunkline/openOrder/openNoPackageWaybill',
method: 'post',
data,
});
};
/**
* 零担录单接口
*/
export const postOpenOrderOpenZeroWaybill = data => {
return request({
@ -121,3 +132,14 @@ export const postCheckWaybill = data => {
data,
});
};
/**
* 查询物料
*/
export const postFindCategoryInfo = data => {
return request({
url: '/api/logpm-trunkline/openOrder/findCategoryInfo',
method: 'post',
data,
});
};

12
src/components/ArteryPrintTemplate/ArteryPrintTemplate.vue

@ -10,7 +10,7 @@
<img src="" alt="暂无图片" />
</th>
<th colspan="6">干线装载清单</th>
<th colspan="8">条形码</th>
<th colspan="8"><img id="imgcode" /></th>
</tr>
<tr>
<th colspan="4">始发站</th>
@ -119,7 +119,7 @@
</template>
<script setup lang="ts">
import { defineProps, ref } from 'vue';
import { defineProps, ref, onMounted } from 'vue';
const props = defineProps(['waybillInfo']);
@ -128,6 +128,14 @@ const { waybillInfo } = props;
/** 是否显示金额统计 */
const isShowTotal = ref(false);
onMounted(() => {
// let script = document.createElement('script');
// script.type = 'text/javascript';
// script.src = '@/utils/barcode.js';
// document.body.appendChild(script);
// document.querySelector('#imgcode').JsBarcode('12312312');
});
</script>
<style lang="scss" scoped>

19
src/components/SelectBox/SelectBox.vue

@ -45,7 +45,15 @@ const _bodyNode = ref<any>('');
const className = ref('');
const props = defineProps(['modelValue', 'placeholder', 'className', 'blur', 'input', 'change']);
const props = defineProps([
'modelValue',
'placeholder',
'className',
'blur',
'input',
'change',
'focus',
]);
const $emit = defineEmits(['update:modelValue']);
const _computed = computed({
@ -76,6 +84,7 @@ const handleClose = () => {
};
const handleFocus = () => {
props.focus && props.focus();
isShowBox.value = true;
};
@ -103,11 +112,9 @@ defineExpose({ handleShow, handleClose });
text-align: center;
.selectContainer {
overflow: scroll;
position: absolute;
width: 100%;
box-sizing: border-box;
padding: 10px;
line-height: normal;
top: 120%;
left: 0;
@ -115,8 +122,6 @@ defineExpose({ handleShow, handleClose });
background: #fff;
border-radius: 3px;
box-shadow: 0px 0px 0.625vw rgba(0, 0, 0, 0.12);
max-height: 200px;
// transition: all 0.3s ease-in-out;
animation: dow 0.5s ease-in-out;
&::before {
@ -135,6 +140,8 @@ defineExpose({ handleShow, handleClose });
.content {
overflow-y: scroll;
padding: 10px;
max-height: 200px;
}
}
}
@ -148,7 +155,7 @@ defineExpose({ handleShow, handleClose });
1% {
display: block;
}
50% {
30% {
opacity: 0;
}
100% {

37
src/components/tablecmt/tablecmt.vue

@ -24,7 +24,6 @@
:sortable="column.sortable"
:selectable="isselectfun"
v-show="column.head"
>
<!-- <template #header>
<el-text class="mx-1">{{ column.label }}</el-text>
@ -39,8 +38,11 @@
show-overflow-tooltip
>
<template #header>
<el-text v-if="column.type == 1 || column.type == 0 || column.type == 12 ||column.type == 6" class="mx-1"></el-text>
<el-text
v-if="column.type == 1 || column.type == 0 || column.type == 12 || column.type == 6"
class="mx-1"
></el-text>
<el-input
v-if="column.type == 2 || column.type == 13"
v-model.trim="column.values"
@ -82,26 +84,15 @@
format="YYYY/MM/DD HH:mm:ss"
@change="timechange($event, column)"
/>
<el-date-picker
v-model="column.values"
v-if="column.type == 6"
type="data"
clearable
style="width: auto"
value-format="YYYY-MM-DD"
format="YYYY/MM/DD"
:placeholder="`请选择${column.label}`"
@change="timechange($event, column)"
/>
</template>
<template #default="scope">
<el-text
class="mx-2 tabculconte"
:class="scope.row[column.prop] == props.searchInput && scope.row[column.prop]
? 'static-class'
: ''
:class="
scope.row[column.prop] == props.searchInput && scope.row[column.prop]
? 'static-class'
: ''
"
:id="scope.row[column.prop]"
v-if="Number(column.type) < 6 && Number(column.type) > 0"
@ -301,7 +292,7 @@ let props = defineProps({
type: Array as PropType<TableColumnType[]>,
required: true,
},
searchInput:{
searchInput: {
type: String,
required: false,
},
@ -410,7 +401,7 @@ function handleCheckSelect(select: []) {
if (props.isselectfun) {
if (props.isselectfun(item)) {
selecttable.value.toggleRowSelection(item, true);
}else{
} else {
selecttable.value.toggleRowSelection(item, true);
}
} else {
@ -503,7 +494,7 @@ function selectchange(value, column: TableColumnType) {
function timechange(value, column: TableColumnType) {
emit('timeCheck', value, column);
}
function timechangeKey(value,column:TableColumnType){
function timechangeKey(value, column: TableColumnType) {
emit('timeCheck', column.values, column);
}
const handleSelectionChange = (param: TableDataType[]) => {
@ -702,7 +693,7 @@ defineExpose({ handleCheckSelect });
font-size: 12px !important;
}
.tabculconte {
color: #333333 ;
color: #333333;
font-size: 12px !important;
}
.slotbuts {
@ -821,6 +812,4 @@ defineExpose({ handleCheckSelect });
background-color: #ff0000;
color: #fff !important;
}
</style>

4
src/router/views/index.js

@ -340,7 +340,7 @@ export default [
import(/* webpackChunkName: "views" */ '@/views/distribution/inventory/BookingNote.vue'),
},
{
path: '/distribution/inventory/CreateOrder',
path: 'CreateOrder',
name: '创建订单',
meta: {
data: 'data',
@ -1438,7 +1438,7 @@ export default [
},
],
},
// {
// path: '/aftersales/aftersalesWorkOrderSS',
// component: Layout,

3107
src/utils/barcode.js

File diff suppressed because it is too large Load Diff

4
src/views/distribution/artery/VehicleStowage.vue

@ -403,9 +403,7 @@
>
</el-button>
<el-button type="primary" icon="el-icon-circle-check" @click="handleSubmit">
</el-button>
<el-button type="primary" icon="Print" @click="handleSubmit"> </el-button>
</div>
</div>
</el-dialog>

2
src/views/distribution/inventory/BookingNote.vue

@ -158,7 +158,7 @@
</el-row>
<el-row>
<el-form-item label="货地址:">
<el-form-item label="货地址:">
<el-input
readonly
v-model="query.consigneeAddress"

193
src/views/distribution/inventory/CreateOrder.vue

@ -135,6 +135,7 @@
<el-row>
<el-form-item label="发货单位:" prop="shipper">
<SelectBox
:focus="handleCloseSelcet"
:input="() => handleFindClientInfo('shipper', 1)"
v-model="query.shipper"
placeholder="发货单位"
@ -144,7 +145,7 @@
:data="details.shipperOptions"
style="width: 100%"
@row-click="handleChooseShipper"
:loading="details.loadingObj.consignerLoading"
v-loading="details.loadingObj.consignerLoading"
>
<el-table-column prop="clientName" label="发货单位" width="130" />
<el-table-column prop="linkMan" label="发货人" width="130" />
@ -156,6 +157,7 @@
<el-form-item label="发货人:" prop="shipperName">
<SelectBox
:focus="handleCloseSelcet"
:input="() => handleFindClientInfo('shipper')"
v-model="query.shipperName"
placeholder="发货人"
@ -165,7 +167,7 @@
:data="details.shipperOptions"
style="width: 100%"
@row-click="handleChooseShipper"
:loading="details.loadingObj.consignerLoading"
v-loading="details.loadingObj.consignerLoading"
>
<el-table-column prop="clientName" label="发货单位" width="130" />
<el-table-column prop="linkMan" label="发货人" width="130" />
@ -179,6 +181,7 @@
<el-row>
<el-form-item label="联系电话:" prop="shipperMobile">
<SelectBox
:focus="handleCloseSelcet"
:input="() => handleFindClientInfo('shipper')"
v-model="query.shipperMobile"
placeholder="联系电话"
@ -188,7 +191,7 @@
:data="details.shipperOptions"
style="width: 100%"
@row-click="handleChooseShipper"
:loading="details.loadingObj.consignerLoading"
v-loading="details.loadingObj.consignerLoading"
>
<el-table-column prop="clientName" label="发货单位" width="130" />
<el-table-column prop="linkMan" label="发货人" width="130" />
@ -216,6 +219,7 @@
<el-row>
<el-form-item label="收货单位:" prop="consignee">
<SelectBox
:focus="handleCloseSelcet"
:input="() => handleFindClientInfo('consignee', 1)"
v-model="query.consignee"
placeholder="收货人"
@ -225,7 +229,7 @@
:data="details.consignerOptions"
style="width: 100%"
@row-click="handleChooseConsigner"
:loading="details.loadingObj.consignerLoading"
v-loading="details.loadingObj.consignerLoading"
>
<el-table-column prop="clientName" label="收货单位" width="130" />
<el-table-column prop="linkMan" label="收货人" width="130" />
@ -237,6 +241,7 @@
<el-form-item label="收货人:" prop="consigneeName">
<SelectBox
:focus="handleCloseSelcet"
:input="() => handleFindClientInfo('consignee')"
v-model="query.consigneeName"
placeholder="收货人"
@ -246,7 +251,7 @@
:data="details.consignerOptions"
style="width: 100%"
@row-click="handleChooseConsigner"
:loading="details.loadingObj.consignerLoading"
v-loading="details.loadingObj.consignerLoading"
>
<el-table-column prop="clientName" label="收货单位" width="130" />
<el-table-column prop="linkMan" label="收货人" width="130" />
@ -260,6 +265,7 @@
<el-row>
<el-form-item label="联系电话:" prop="consigneeMobile">
<SelectBox
:focus="handleCloseSelcet"
:input="() => handleFindClientInfo('consignee')"
v-model="query.consigneeMobile"
placeholder="联系电话"
@ -269,7 +275,7 @@
:data="details.consignerOptions"
style="width: 100%"
@row-click="handleChooseConsigner"
:loading="details.loadingObj.consignerLoading"
v-loading="details.loadingObj.consignerLoading"
>
<el-table-column prop="clientName" label="收货单位" width="130" />
<el-table-column prop="linkMan" label="收货人" width="130" />
@ -346,8 +352,35 @@
prop="goodsName"
class="el-times"
>
<SelectBox className="goodsName" v-model="item.goodsName" placeholder="货物名称">
暂无数据
<SelectBox
ref="goodsNameRef"
className="goodsName"
:input="() => debounce(handleFindGoods(item.goodsName, item), 1000)"
:focus="handleCloseSelcet"
v-model="item.goodsName"
placeholder="货物名称"
>
<div v-loading="item.loading">
<template v-if="item.goodsListOptions.length > 0">
<div
class="goodsNameRow"
v-for="val in item.goodsListOptions"
:key="val.goodsId"
@click="
() => {
item.goodsName = val.goodsName;
item.goodsId = val.goodsId;
handleCloseSelcet();
}
"
>
{{ val.goodsName }}
</div>
</template>
<template v-else>
<div class="goodsNameRow" @click="handleCloseSelcet">暂无数据</div>
</template>
</div>
</SelectBox>
</el-form-item>
@ -828,9 +861,12 @@
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<el-button type="text" @click="handleShowPackageOrderList(slotProps.scope)">
<el-text
v-if="details.orderStatus === 'haveData'"
@click="handleShowPackageOrderList(slotProps.scope)"
>
包明细
</el-button>
</el-text>
</template>
</template>
</tablecmt>
@ -858,7 +894,7 @@
</div>
</el-dialog>
<!-- 选取订 -->
<!-- 提示是否继续开 -->
<el-dialog
title="提示"
:center="true"
@ -920,6 +956,8 @@ import {
postFindWaybillDetail,
postUpdateWaybill,
postUpdateWaybillVerify,
postOpenOrderOpenZeroWaybill,
postFindCategoryInfo,
} from '@/api/distribution/CreateOrder.js';
// vue
@ -955,8 +993,6 @@ const details = reactive<any>({
departureWarehouseName: '',
/** 到站 */
destination: [],
/** 货号 */
'-totalNum': 0,
/** 订单自编号 */
orderCode: '',
/** 目的站名称 */
@ -964,7 +1000,7 @@ const details = reactive<any>({
/** 目的仓Id */
destinationWarehouseId: '',
queryDestinationWarehouseName: '',
/** 货号 */
/** 货号 */
goodsCode: '',
/** 发货单位id */
shipperId: '',
@ -1433,6 +1469,9 @@ const shipperMobile = ref();
//
const shipperNodeList = [shipper, shipperName, shipperMobile];
//
const goodsNameRef = ref();
//
const totalCost = computed(() => {
// let _num = 0;
@ -1532,36 +1571,58 @@ const onLoad = async (idsArr = []) => {
details.query.consigneeAddress = data.consigneeAddress || '';
details.query.destination = data.destinationArray;
details.query.destinationWarehouseName = data.departureWarehouseName;
details.query.destinationWarehouseId = data.departureWarehouseId;
details.query.queryDestinationWarehouseName = data.departureWarehouseName;
let _maxNum = 0;
details.goodsList = data.goodsList.map(val => {
val.num = isNumber(val.num) ? Number(val.num) : 0;
val.price = isNumber(val.price) ? Number(val.price) : 0;
val.volume = isNumber(val.volume) ? Number(val.volume) : 0;
val.weight = isNumber(val.weight) ? Number(val.weight) : 0;
val.chargeType = val.chargeType || 1;
//
handleComputed(val);
//
_maxNum += val.num;
console.log('val :>> ', val);
return val;
});
details.query.queryDestinationWarehouseName = data.destinationWarehouseName || '';
if (data.goodsList.length === 0) {
details.goodsList = [
{
index: 0,
/** 货物名称 */
goodsName: '',
/** 品类Id */
goodsId: '',
/** 计费方式 */
chargeType: 1,
/** 件数 */
num: 0,
/** 重量(kg) */
weight: 0,
/** 体积(方) */
volume: 0,
/** 单价 */
price: 0,
/** 运费小计 */
subtotalFreight: 0,
/** 货物list */
goodsListOptions: [],
},
];
} else {
details.goodsList = data.goodsList.map(val => {
val.num = isNumber(val.num) ? Number(val.num) : 0;
val.price = isNumber(val.price) ? Number(val.price) : 0;
val.volume = isNumber(val.volume) ? Number(val.volume) : 0;
val.weight = isNumber(val.weight) ? Number(val.weight) : 0;
val.chargeType = val.chargeType || 1;
val.goodsListOptions = [];
//
handleComputed(val);
//
return val;
});
}
info.value.maxNum = _maxNum;
details.query.goodsCode = '-' + _maxNum;
info.value.maxNum = data.totalNum;
details.query.goodsCode = '-' + data.totalNum;
if (data.defaultPayWay) {
data.payWay = data.defaultPayWay;
} else {
details.query.payWay = data.payWayList.find(val => val.dictValue === '到付').dictKey || '2';
}
details.query.transportType = '1';
details.query.transportType = details.query.transportType || '1';
// details.goodsCode = data['totalNum'];
console.log('details.query', details.query);
console.log('info.value :>> ', info.value);
@ -1634,6 +1695,8 @@ const initPageInfo = async (idsArr = []) => {
price: 0,
/** 运费小计 */
subtotalFreight: 0,
/** 货物名称list */
goodsListOptions: [],
},
];
else {
@ -1648,6 +1711,8 @@ const initPageInfo = async (idsArr = []) => {
val.goodsName = val.productName;
val.goodsListOptions = [];
//
if (!val.subtotalFreight) handleComputed(val);
@ -1665,6 +1730,12 @@ const initPageInfo = async (idsArr = []) => {
}
};
const handleCloseSelcet = () => {
shipperNodeList.forEach(val => val.value.handleClose());
consigneeNodeList.forEach(val => val.value.handleClose());
goodsNameRef.value.forEach(val => val.handleClose());
};
/** 新增货物 */
const handleAdd = () => {
if (info.value.maxNum <= details.totalObj.totalCount) {
@ -1862,7 +1933,7 @@ const sizeChange = (pageSize: number) => {
/** 页码改变执行的回调 */
const currentChange = current => {
details.page.pageNum = current;
init();
onLoad();
};
/** 查看包明细 */
@ -1969,7 +2040,8 @@ const handleChooseShipper = (column, prop, order) => {
details.query.shipperAddress = column.linkAddress;
details.query.shipperName = column.linkMan;
details.query.shipperMobile = column.linkPhone;
shipperNodeList.forEach(val => val.value.handleClose());
handleCloseSelcet();
};
/** 收货客户选择 */
@ -1980,7 +2052,7 @@ const handleChooseConsigner = (column, prop, order) => {
details.query.consigneeAddress = column.linkAddress;
details.query.consigneeName = column.linkMan;
details.query.consigneeMobile = column.linkPhone;
consigneeNodeList.forEach(val => val.value.handleClose());
handleCloseSelcet();
};
/** 切换tabBar */
@ -2084,6 +2156,7 @@ const resetForm = (formEl: FormInstance | undefined) => {
price: 0,
/** 运费小计 */
subtotalFreight: 0,
goodsListOptions: [],
},
];
initPageInfo();
@ -2165,7 +2238,7 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
let res: any = {};
//
if (details.pageInfo.type !== 'edit') {
submitData.addList = submitData.goodsList;
submitData.addList = details.goodsList;
submitData.removeList = [];
delete submitData.goodsList;
@ -2178,7 +2251,9 @@ const handleSubmit = (formEl: FormInstance | undefined) => {
//
details.submitData = submitData;
res = await postOpenOrderOpenWaybill(submitData);
//
if (details.orderStatus === 'haveData') res = await postOpenOrderOpenWaybill(submitData);
else res = await postOpenOrderOpenZeroWaybill(submitData);
} else {
submitData.waybillId = details.pageInfo.id;
@ -2280,6 +2355,28 @@ const handleRepetition = () => {
resetForm(ruleFormRef.value);
};
/** 查询货物 */
const handleFindGoods = async (goodsName, item) => {
console.log('goodsNameRef :>> ', goodsNameRef);
console.log('item :>> ', item);
item.goodsId = '';
if (!goodsName) return;
try {
item.loading = true;
const res = await postFindCategoryInfo({ goodsName });
const { code, data } = res.data;
if (code !== 200) return;
item.goodsListOptions = data;
} catch (error) {
console.log('error :>> ', error);
} finally {
item.loading = false;
}
};
watch(
$route,
async () => {
@ -2287,6 +2384,8 @@ watch(
//
details.deepQuery = deepClone(details.query);
details.orderStatus = $route.query.orderStatus;
initPageInfo();
},
{ immediate: true }
@ -2510,4 +2609,14 @@ $borderColor: #172e60;
background: #f00;
}
}
.goodsNameRow {
background: #fff;
transition: all 0.3s;
padding: 10px 0;
&:hover {
background: #f5f7fa;
}
}
</style>

105
src/views/waybill/CreateZeroOrder.vue

@ -88,6 +88,7 @@
<el-row>
<el-form-item label="发货单位:" prop="shipper">
<SelectBox
:focus="handleCloseSelcet"
:input="() => handleFindClientInfo('shipper', 1)"
v-model="query.shipper"
placeholder="发货单位"
@ -97,7 +98,7 @@
:data="details.shipperOptions"
style="width: 100%"
@row-click="handleChooseShipper"
:loading="details.loadingObj.consignerLoading"
v-loading="details.loadingObj.consignerLoading"
>
<el-table-column prop="clientName" label="发货单位" width="130" />
<el-table-column prop="linkMan" label="发货人" width="130" />
@ -109,6 +110,7 @@
<el-form-item label="发货人:" prop="shipperName">
<SelectBox
:focus="handleCloseSelcet"
:input="() => handleFindClientInfo('shipper')"
v-model="query.shipperName"
placeholder="发货人"
@ -118,7 +120,7 @@
:data="details.shipperOptions"
style="width: 100%"
@row-click="handleChooseShipper"
:loading="details.loadingObj.consignerLoading"
v-loading="details.loadingObj.consignerLoading"
>
<el-table-column prop="clientName" label="发货单位" width="130" />
<el-table-column prop="linkMan" label="发货人" width="130" />
@ -132,6 +134,7 @@
<el-row>
<el-form-item label="联系电话:" prop="shipperMobile">
<SelectBox
:focus="handleCloseSelcet"
:input="() => handleFindClientInfo('shipper')"
v-model="query.shipperMobile"
placeholder="联系电话"
@ -141,7 +144,7 @@
:data="details.shipperOptions"
style="width: 100%"
@row-click="handleChooseShipper"
:loading="details.loadingObj.consignerLoading"
v-loading="details.loadingObj.consignerLoading"
>
<el-table-column prop="clientName" label="发货单位" width="130" />
<el-table-column prop="linkMan" label="发货人" width="130" />
@ -165,6 +168,7 @@
<el-row>
<el-form-item label="发货单位:" prop="consignee">
<SelectBox
:focus="handleCloseSelcet"
:input="() => handleFindClientInfo('consignee', 1)"
v-model="query.consignee"
placeholder="收货人"
@ -174,7 +178,7 @@
:data="details.consignerOptions"
style="width: 100%"
@row-click="handleChooseConsigner"
:loading="details.loadingObj.consignerLoading"
v-loading="details.loadingObj.consignerLoading"
>
<el-table-column prop="clientName" label="发货单位" width="130" />
<el-table-column prop="linkMan" label="发货人" width="130" />
@ -186,6 +190,7 @@
<el-form-item label="收货人:" prop="consigneeName">
<SelectBox
:focus="handleCloseSelcet"
:input="() => handleFindClientInfo('consignee')"
v-model="query.consigneeName"
placeholder="收货人"
@ -195,7 +200,7 @@
:data="details.consignerOptions"
style="width: 100%"
@row-click="handleChooseConsigner"
:loading="details.loadingObj.consignerLoading"
v-loading="details.loadingObj.consignerLoading"
>
<el-table-column prop="clientName" label="发货单位" width="130" />
<el-table-column prop="linkMan" label="发货人" width="130" />
@ -209,6 +214,7 @@
<el-row>
<el-form-item label="联系电话:" prop="consigneeMobile">
<SelectBox
:focus="handleCloseSelcet"
:input="() => handleFindClientInfo('consignee')"
v-model="query.consigneeMobile"
placeholder="联系电话"
@ -218,7 +224,7 @@
:data="details.consignerOptions"
style="width: 100%"
@row-click="handleChooseConsigner"
:loading="details.loadingObj.consignerLoading"
v-loading="details.loadingObj.consignerLoading"
>
<el-table-column prop="clientName" label="发货单位" width="130" />
<el-table-column prop="linkMan" label="发货人" width="130" />
@ -291,8 +297,35 @@
prop="goodsName"
class="el-times"
>
<SelectBox className="goodsName" v-model="item.goodsName" placeholder="货物名称">
暂无数据
<SelectBox
ref="goodsNameRef"
className="goodsName"
:input="() => debounce(handleFindGoods(item.goodsName, item), 1000)"
:focus="handleCloseSelcet"
v-model="item.goodsName"
placeholder="货物名称"
>
<div v-loading="item.loading">
<template v-if="item.goodsListOptions.length > 0">
<div
class="goodsNameRow"
v-for="val in item.goodsListOptions"
:key="val.goodsId"
@click="
() => {
item.goodsName = val.goodsName;
item.goodsId = val.goodsId;
handleCloseSelcet();
}
"
>
{{ val.goodsName }}
</div>
</template>
<template v-else>
<div class="goodsNameRow" @click="handleCloseSelcet">暂无数据</div>
</template>
</div>
</SelectBox>
</el-form-item>
@ -808,6 +841,7 @@ import {
postFindWaybillDetail,
postUpdateWaybillVerify,
postUpdateWaybill,
postFindCategoryInfo,
} from '@/api/distribution/CreateOrder.js';
import { isNumber, getObjType } from '@/utils/util.js';
import { deepClone } from 'avue-plugin-ueditor/packages/ueditor/src/upload/util';
@ -982,6 +1016,8 @@ const details = reactive<any>({
price: 0,
/** 运费小计 */
subtotalFreight: 0,
/** 货物名称list */
goodsListOptions: [],
},
],
options: [],
@ -1349,6 +1385,9 @@ const shipperMobile = ref();
//
const shipperNodeList = [shipper, shipperName, shipperMobile];
//
const goodsNameRef = ref();
/** vuex */
const permission = computed(() => mapGetters(['permission', 'tagWel', 'tagList']));
console.log('permission :>> ', permission);
@ -1463,6 +1502,8 @@ const initPageInfo = async () => {
price: 0,
/** 运费小计 */
subtotalFreight: 0,
/** 货物名称list */
goodsListOptions: [],
},
];
else {
@ -1476,6 +1517,9 @@ const initPageInfo = async () => {
val.goodsName = val.productName;
/** 货物名称list */
val.goodsListOptions = [];
//
if (!val.subtotalFreight) handleComputed(val);
@ -1590,6 +1634,13 @@ const handleRemove = (index: number) => {
details.goodsList.splice(index, 1);
};
/** 关闭select弹窗 */
const handleCloseSelcet = () => {
shipperNodeList.forEach(val => val.value.handleClose());
consigneeNodeList.forEach(val => val.value.handleClose());
goodsNameRef.value.forEach(val => val.handleClose());
};
/** 查询目的仓 */
let _ant1 = null;
const remoteMethod = val => {
@ -1618,6 +1669,28 @@ const destinationWarehouseNameChange = val => {
).warehouseName;
};
/** 查询货物 */
const handleFindGoods = async (goodsName, item) => {
console.log('goodsNameRef :>> ', goodsNameRef);
console.log('item :>> ', item);
item.goodsId = '';
if (!goodsName) return;
try {
item.loading = true;
const res = await postFindCategoryInfo({ goodsName });
const { code, data } = res.data;
if (code !== 200) return;
item.goodsListOptions = data;
} catch (error) {
console.log('error :>> ', error);
} finally {
item.loading = false;
}
};
/** 计算行合计 */
const handleComputed = (row: any) => {
details.query.goodsCode = '-' + details.totalObj.totalCount;
@ -1678,7 +1751,7 @@ const handleChooseShipper = (column, prop, order) => {
details.query.shipperAddress = column.linkAddress;
details.query.shipperName = column.linkMan;
details.query.shipperMobile = column.linkPhone;
shipperNodeList.forEach(val => val.value.handleClose());
handleCloseSelcet();
};
/** 收货客户选择 */
@ -1689,7 +1762,7 @@ const handleChooseConsigner = (column, prop, order) => {
details.query.consigneeAddress = column.linkAddress;
details.query.consigneeName = column.linkMan;
details.query.consigneeMobile = column.linkPhone;
consigneeNodeList.forEach(val => val.value.handleClose());
handleCloseSelcet();
};
/** 返回 */
@ -1777,6 +1850,8 @@ const resetForm = (formEl: FormInstance | undefined) => {
price: 0,
/** 运费小计 */
subtotalFreight: 0,
/** 货物名称list */
goodsListOptions: [],
},
];
initPageInfo();
@ -2183,4 +2258,14 @@ $borderColor: #172e60;
.mt20 {
margin-top: 20px;
}
.goodsNameRow {
background: #fff;
transition: all 0.3s;
padding: 10px 0;
&:hover {
background: #f5f7fa;
}
}
</style>

114
src/views/waybill/TemporaryStorageList.vue

@ -59,23 +59,34 @@
<el-button type="primary" icon="el-icon-plus" @click="handleCreateOrder"
>订单转运单
</el-button>
<el-button type="primary" icon="Edit" @click="editClientInfo"
>修改客户信息</el-button
>
<el-button type="primary" icon="Edit" @click="editClientInfo">
修改客户信息
</el-button>
<el-button type="primary" icon="Delete" @click="handleDelete">删除</el-button>
<el-button type="primary" icon="Plus" @click="handleOpenAddTagDlog"
<el-button
type="primary"
icon="Plus"
v-if="details.orderStatus === 'haveData'"
@click="handleOpenAddTagDlog"
>开标签</el-button
>
<el-button
type="primary"
icon="Upload"
@click="details.popUpShow.UploadBatch = true"
@click="
() => {
details.popUpShow.UploadBatch = true;
details.ouPaiChooseType = 0;
}
"
>
批量开标签导入
</el-button>
<el-button
type="primary"
icon="Upload"
v-if="details.orderStatus === 'haveData'"
@click="
() => {
details.popUpShow.UploadPackageDelivery = true;
@ -116,7 +127,12 @@
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<el-text @click="handleShowPackageOrderList(slotProps.scope)"> 包明细 </el-text>
<el-text
v-if="details.orderStatus === 'haveData'"
@click="handleShowPackageOrderList(slotProps.scope)"
>
包明细
</el-text>
</template>
</template>
</tablecmt>
@ -335,38 +351,58 @@
class="el-dialog-UploadBatch"
title="批量开标签导入"
:visible.sync="details.popUpShow.UploadBatch"
width="70%"
:width="details.orderStatus !== 'haveData' || details.ouPaiChooseType !== 0 ? '70%' : '40%'"
v-model="details.popUpShow.UploadBatch"
>
<!-- 选择导入类型 -->
<div v-loading="details.loadingObj.UploadLoadong" element-loading-text="数据处理中...">
<div>
<el-divider content-position="left">数据导入</el-divider>
</div>
<template v-if="details.ouPaiChooseType === 0 && details.orderStatus === 'haveData'">
<div style="text-align: center">
<el-button type="primary" icon="Upload" @click="details.ouPaiChooseType = 1">
有数据导入
</el-button>
<el-button type="primary" icon="Upload" @click="details.ouPaiChooseType = 2">
无数据导入
</el-button>
</div>
</template>
<P>请确认传入的文件为Excel文件格式</P>
<template v-else-if="details.orderStatus !== 'haveData' || details.ouPaiChooseType !== 0">
<div>
<el-divider content-position="left">{{
details.ouPaiChooseType === 1 ? '有数据导入' : '无数据导入'
}}</el-divider>
</div>
<a
href="http://47.108.51.143:9000/bladex/upload/20240118/65c977fe6ac575ebb17803400a7abbc7.xlsx"
style="text-decoration: none"
>
<el-button type="primary" icon="Download"> 模版下载 </el-button>
</a>
<div>
<el-upload
class="upload-demo mt10"
drag
:headers="details.header"
action="/api/logpm-trunkline/openOrder/openLabelHasPacakage"
:before-upload="handleBeforeUpload"
:on-success="handleSuccess"
:on-error="handleClose"
multiple
<P>请确认传入的文件为Excel文件格式</P>
<a
href="http://47.108.51.143:9000/bladex/upload/20240118/65c977fe6ac575ebb17803400a7abbc7.xlsx"
style="text-decoration: none"
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">拖拽文件或 <em>点击上传</em></div>
</el-upload>
</div>
<el-button type="primary" icon="Download"> 模版下载 </el-button>
</a>
<div v-loading="details.loadingObj.UploadLoadong" class="mt10">
<el-upload
class="upload-demo"
drag
:headers="details.header"
:action="
details.ouPaiChooseType === 1 && details.orderStatus === 'haveData'
? '/api/logpm-trunkline/openOrder/openLabelHasPacakage'
: '/api/logpm-trunkline/openOrder/importOrderNoPackage'
"
:before-upload="handleBeforeUpload"
:on-success="handleSuccess"
:on-error="handleClose"
multiple
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">拖拽文件或 <em>点击上传</em></div>
</el-upload>
</div>
</template>
</div>
</el-dialog>
@ -779,7 +815,7 @@ const details = reactive<any>({
/** 开标签的必填项 */
addTagFormRules: {},
/** tab标签有无数据 */
orderStatus: 'haveData',
orderStatus: 'haveData' as 'haveData' | 'notHaveData',
});
const handleRules = () => {
@ -1008,6 +1044,8 @@ const handleCreateOrder = () => {
name: `开单`,
ids: JSON.stringify(details.selectionList.map(item => item.id)),
type: 'add',
orderStatus: details.orderStatus,
backPath: '/waybill/TemporaryStorageList',
},
});
};
@ -1347,4 +1385,14 @@ onActivated(() => {
.overflow {
overflow: hidden;
}
// tabbar
:deep(.el-tabs__item.is-active) {
font-weight: bold;
color: #d38729;
}
:deep(.el-tabs__active-bar) {
background: #d38729;
}
</style>

Loading…
Cancel
Save