|
@@ -27,6 +27,7 @@
|
|
|
<p>收货人:{{ shippingForm.order_vo.customer_name }}</p>
|
|
<p>收货人:{{ shippingForm.order_vo.customer_name }}</p>
|
|
|
<p>联系电话:{{ shippingForm.order_vo.customer_phone }}</p>
|
|
<p>联系电话:{{ shippingForm.order_vo.customer_phone }}</p>
|
|
|
<p>地址:{{ shippingForm.order_vo.province_city_area_address }}</p>
|
|
<p>地址:{{ shippingForm.order_vo.province_city_area_address }}</p>
|
|
|
|
|
+ <p>商品总数:{{ good_total }}</p>
|
|
|
<p>客户备注:{{ shippingForm.order_vo.remark }}</p>
|
|
<p>客户备注:{{ shippingForm.order_vo.remark }}</p>
|
|
|
<p v-if="send_type !== 'EXPRESS_DELIVERY'">
|
|
<p v-if="send_type !== 'EXPRESS_DELIVERY'">
|
|
|
<span v-if="shippingForm.order_vo.send_type !== 'SELF_PICKUP'">运单号:{{
|
|
<span v-if="shippingForm.order_vo.send_type !== 'SELF_PICKUP'">运单号:{{
|
|
@@ -113,11 +114,13 @@
|
|
|
<el-button type="primary" size="large"
|
|
<el-button type="primary" size="large"
|
|
|
v-if="shippingForm.kdn_order_code == '' || shippingForm.kdn_order_code == undefined"
|
|
v-if="shippingForm.kdn_order_code == '' || shippingForm.kdn_order_code == undefined"
|
|
|
@click="getOrderNumber">获取运单号</el-button>
|
|
@click="getOrderNumber">获取运单号</el-button>
|
|
|
- <el-button type="primary" size="large" v-else @click="ship">发货</el-button>
|
|
|
|
|
|
|
+ <div v-else class="pl-2">
|
|
|
|
|
+ <el-button type="primary" v-if="activeTab == 'basic-info'" size="large" @click="ship">发货</el-button>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex justify-center pt-2 pb-2 mt-4 w-full fixed bottom-0 bg-white left-0 z-50" v-else>
|
|
<div class="flex justify-center pt-2 pb-2 mt-4 w-full fixed bottom-0 bg-white left-0 z-50" v-else>
|
|
|
<el-button type="primary" size="large" @click="scanCode">扫码出库</el-button>
|
|
<el-button type="primary" size="large" @click="scanCode">扫码出库</el-button>
|
|
|
- <el-button type="primary" size="large" @click="ship">发货</el-button>
|
|
|
|
|
|
|
+ <el-button type="primary" size="large" v-if="activeTab == 'basic-info'" @click="ship">发货</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -489,6 +492,8 @@ const ship = () => {
|
|
|
const kdsShip = () => {
|
|
const kdsShip = () => {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+/* 商品总数 */
|
|
|
|
|
+let good_total = 0
|
|
|
const init = async () => {
|
|
const init = async () => {
|
|
|
try {
|
|
try {
|
|
|
const res: any = await orderApi.getSendOrderDetail(id.value);
|
|
const res: any = await orderApi.getSendOrderDetail(id.value);
|
|
@@ -498,6 +503,10 @@ const init = async () => {
|
|
|
params.value.total_weight = Number(
|
|
params.value.total_weight = Number(
|
|
|
el.product_vo.weight * el.num
|
|
el.product_vo.weight * el.num
|
|
|
);
|
|
);
|
|
|
|
|
+ if (params.value.total_weight == 0) {
|
|
|
|
|
+ params.value.total_weight = 1
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
el.orderNum = el.num
|
|
el.orderNum = el.num
|
|
|
if (res.data.kdn_order_code == undefined || res.data.kdn_order_code == '') {
|
|
if (res.data.kdn_order_code == undefined || res.data.kdn_order_code == '') {
|
|
|
el.num = 0
|
|
el.num = 0
|
|
@@ -517,8 +526,11 @@ const init = async () => {
|
|
|
})
|
|
})
|
|
|
barcodeValue.value = res.data.order_vo.sn;
|
|
barcodeValue.value = res.data.order_vo.sn;
|
|
|
//物品价格
|
|
//物品价格
|
|
|
- if (res.data.total_volume !== undefined) {
|
|
|
|
|
|
|
+ if (res.data.total_volume !== undefined && res.data.total_volume!==0) {
|
|
|
params.value.total_volume = Number(res.data.total_volume)
|
|
params.value.total_volume = Number(res.data.total_volume)
|
|
|
|
|
+ }else{
|
|
|
|
|
+
|
|
|
|
|
+ params.value.total_volume = 0.01
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
params.value.declared_value = Number(res.data.order_vo.real_price)
|
|
params.value.declared_value = Number(res.data.order_vo.real_price)
|
|
@@ -540,6 +552,10 @@ const init = async () => {
|
|
|
params.value.receiver.area_name = codeToText[receiverList[2]];
|
|
params.value.receiver.area_name = codeToText[receiverList[2]];
|
|
|
params.value.receiver.address = res.data.order_vo.address;
|
|
params.value.receiver.address = res.data.order_vo.address;
|
|
|
shippingForm.value = res.data;
|
|
shippingForm.value = res.data;
|
|
|
|
|
+ res.data.order_item_vos.map(el => {
|
|
|
|
|
+ good_total += el.orderNum
|
|
|
|
|
+ })
|
|
|
|
|
+ console.log(good_total);
|
|
|
console.log("Barcode value set to:", shippingForm);
|
|
console.log("Barcode value set to:", shippingForm);
|
|
|
} else {
|
|
} else {
|
|
|
console.error("Invalid response structure:", res);
|
|
console.error("Invalid response structure:", res);
|