Compare commits
No commits in common. "11a5e12b15f16e22af846d55fcdf65a1dfe89678" and "a2afd37ae5d37c3a233990fd764596b35a0a838b" have entirely different histories.
11a5e12b15
...
a2afd37ae5
|
@ -22,8 +22,7 @@
|
||||||
<view v-for="(item, index) in gridList1" :key="index">
|
<view v-for="(item, index) in gridList1" :key="index">
|
||||||
<text v-if="item.name">{{ item.name }}:</text
|
<text v-if="item.name">{{ item.name }}:</text
|
||||||
><text v-if="item.name"
|
><text v-if="item.name"
|
||||||
>{{ item.isBefore ? item.unit : "" }}
|
>{{ item.isBefore ? item.unit : "" }} {{ formatMoney(item.num, item.decimal) }}
|
||||||
{{ formatMoney(item.num, item.decimal) }}
|
|
||||||
{{ item.isBefore ? "" : item.unit }}
|
{{ item.isBefore ? "" : item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
|
@ -31,13 +30,10 @@
|
||||||
|
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view v-for="(item, index) in gridList2" :key="index">
|
<view v-for="(item, index) in gridList2" :key="index">
|
||||||
<text v-if="item.name">{{ item.name }}:</text>
|
<text v-if="item.name">{{ item.name }}:</text
|
||||||
<text
|
|
||||||
:class="{ highLight: item.isHighLight || false }"
|
|
||||||
v-if="item.name"
|
|
||||||
>
|
>
|
||||||
{{ item.isBefore ? item.unit : "" }}
|
<text :class="{'highLight': item.isHighLight || false}" v-if="item.name"
|
||||||
{{ formatMoney(item.num, item.decimal) }}
|
>{{ item.isBefore ? item.unit : "" }} {{ formatMoney(item.num, item.decimal) }}
|
||||||
{{ item.isBefore ? "" : item.unit }}
|
{{ item.isBefore ? "" : item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
|
@ -47,8 +43,7 @@
|
||||||
<view v-for="(item, index) in gridList3" :key="index">
|
<view v-for="(item, index) in gridList3" :key="index">
|
||||||
<text>{{ item.name }}:</text
|
<text>{{ item.name }}:</text
|
||||||
><text :class="item.isHighLight ? 'highLight' : ''"
|
><text :class="item.isHighLight ? 'highLight' : ''"
|
||||||
>{{ item.isBefore ? item.unit : "" }}
|
>{{ item.isBefore ? item.unit : "" }} {{ formatMoney(item.num, item.decimal)}}
|
||||||
{{ formatMoney(item.num, item.decimal) }}
|
|
||||||
{{ item.isBefore ? "" : item.unit }}
|
{{ item.isBefore ? "" : item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
|
@ -111,6 +106,9 @@ const handleOk = (v: any) => {
|
||||||
currentTab.value = 5;
|
currentTab.value = 5;
|
||||||
getOverview();
|
getOverview();
|
||||||
};
|
};
|
||||||
|
const randomNum = (index: number) => {
|
||||||
|
return Math.floor(Math.random() * (10000 - 1 + 1)) + 1 + index;
|
||||||
|
};
|
||||||
|
|
||||||
const gridList1 = reactive([
|
const gridList1 = reactive([
|
||||||
{
|
{
|
||||||
|
@ -204,6 +202,7 @@ const gridList2 = reactive([
|
||||||
num: "",
|
num: "",
|
||||||
isHighLight: true,
|
isHighLight: true,
|
||||||
decimal: 0,
|
decimal: 0,
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "",
|
name: "",
|
||||||
|
|
|
@ -42,17 +42,9 @@
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view v-for="(item, index) in gridList2" :key="index">
|
<view v-for="(item, index) in gridList2" :key="index">
|
||||||
<text v-if="item.name">{{ item.name }}:</text
|
<text v-if="item.name">{{ item.name }}:</text
|
||||||
><text>
|
><text
|
||||||
{{ item.isBefore ? item.unit : "" }}
|
>{{ item.isBefore ? item.unit : "" }}
|
||||||
<!-- ------- -->
|
{{ item.num }}
|
||||||
<text v-if="item.name === '净重误差'">
|
|
||||||
{{
|
|
||||||
(state.order.netWeight || 0) -
|
|
||||||
(state.order.settlementNet || 0)
|
|
||||||
}}
|
|
||||||
</text>
|
|
||||||
<text v-else> {{ item.num }}</text>
|
|
||||||
<!-- -------- -->
|
|
||||||
{{ item.isBefore ? "" : item.unit }}
|
{{ item.isBefore ? "" : item.unit }}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -43,9 +43,7 @@
|
||||||
<text v-if="item.key === 'subtractNum'">
|
<text v-if="item.key === 'subtractNum'">
|
||||||
{{
|
{{
|
||||||
model1.order.buttonType === 0
|
model1.order.buttonType === 0
|
||||||
? !isKg()
|
? (!isKg() ? item.unit1 : item.unit)
|
||||||
? item.unit1
|
|
||||||
: item.unit
|
|
||||||
: "%"
|
: "%"
|
||||||
}}
|
}}
|
||||||
</text>
|
</text>
|
||||||
|
@ -70,7 +68,6 @@
|
||||||
v-if="item.type === 'radio'"
|
v-if="item.type === 'radio'"
|
||||||
v-model="(model1.order as any)[item.key]"
|
v-model="(model1.order as any)[item.key]"
|
||||||
placement="row"
|
placement="row"
|
||||||
@change="item.changeRadio"
|
|
||||||
>
|
>
|
||||||
<u-radio
|
<u-radio
|
||||||
v-for="(c, index) in item.child"
|
v-for="(c, index) in item.child"
|
||||||
|
@ -112,7 +109,7 @@ import {
|
||||||
num_subtract,
|
num_subtract,
|
||||||
countDots,
|
countDots,
|
||||||
isTwoDecimalPlaces,
|
isTwoDecimalPlaces,
|
||||||
num_multiply,
|
num_multiply
|
||||||
} from "@/utils";
|
} from "@/utils";
|
||||||
import {
|
import {
|
||||||
ImagesType,
|
ImagesType,
|
||||||
|
@ -193,10 +190,9 @@ const handleBlur = (e: any, item: any) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const model1 = reactive<{
|
const model1 = reactive<{
|
||||||
scaleStatusBtnType: number;
|
scaleStatusBtnType: number;
|
||||||
order: any;
|
order: Shipment;
|
||||||
}>({
|
}>({
|
||||||
scaleStatusBtnType: 2,
|
scaleStatusBtnType: 2,
|
||||||
order: {
|
order: {
|
||||||
|
@ -217,8 +213,6 @@ const model1 = reactive<{
|
||||||
settlementUnit: 1,
|
settlementUnit: 1,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const recordSettlementUnit = ref(1);
|
|
||||||
const isKg = () => {
|
const isKg = () => {
|
||||||
if (model1.order.settlementUnit === 1) {
|
if (model1.order.settlementUnit === 1) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -310,25 +304,6 @@ const formAttrList = reactive<ComType>([
|
||||||
name: "吨",
|
name: "吨",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
changeRadio: (v: any) => {
|
|
||||||
if (recordSettlementUnit.value !== model1.order.settlementUnit) {
|
|
||||||
model1.order.settlementGross = null;
|
|
||||||
model1.order.settlementTare = null;
|
|
||||||
model1.order.settlementNet = null;
|
|
||||||
model1.order.unitPrice = null;
|
|
||||||
model1.order.buttonType = 0;
|
|
||||||
model1.order.subtractNum = null;
|
|
||||||
model1.order.settlementWeight = null;
|
|
||||||
model1.order.estimatePrice = null;
|
|
||||||
model1.order.totalPrice = null;
|
|
||||||
model1.order.freight = null;
|
|
||||||
model1.order.incidentals = null;
|
|
||||||
model1.order.realIncome = null;
|
|
||||||
model1.order.paymentMethodName = null;
|
|
||||||
model1.order.settlementNotes = "";
|
|
||||||
}
|
|
||||||
recordSettlementUnit.value = v;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "毛重",
|
name: "毛重",
|
||||||
|
@ -371,6 +346,13 @@ const formAttrList = reactive<ComType>([
|
||||||
fn: () => {},
|
fn: () => {},
|
||||||
isNumber: true,
|
isNumber: true,
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// name: "验货净重",
|
||||||
|
// key: "number",
|
||||||
|
// type: "input",
|
||||||
|
// required: true,
|
||||||
|
// unit: "件",
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
name: "扣杂",
|
name: "扣杂",
|
||||||
key: "buttonType",
|
key: "buttonType",
|
||||||
|
@ -427,6 +409,16 @@ const formAttrList = reactive<ComType>([
|
||||||
type: "input",
|
type: "input",
|
||||||
unit: "",
|
unit: "",
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
// child: [
|
||||||
|
// {
|
||||||
|
// id: 0,
|
||||||
|
// name: "送货",
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// id: 1,
|
||||||
|
// name: "自提",
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "运费",
|
name: "运费",
|
||||||
|
@ -499,39 +491,25 @@ watch(
|
||||||
预估总价: 结算单价*结算重量
|
预估总价: 结算单价*结算重量
|
||||||
实际收入:实际结算金额-运费-杂费
|
实际收入:实际结算金额-运费-杂费
|
||||||
*/
|
*/
|
||||||
model1.order.settlementNet = <any>(
|
model1.order.settlementNet = <any>num_subtract(
|
||||||
num_subtract(settlementGrossNew || 0, settlementTareNew || 0).toFixed(2)
|
settlementGrossNew || 0,
|
||||||
);
|
settlementTareNew || 0
|
||||||
|
).toFixed(2);
|
||||||
if (model1.order.buttonType === 0) {
|
if (model1.order.buttonType === 0) {
|
||||||
if (model1.order.subtractNum) {
|
if (model1.order.subtractNum) {
|
||||||
model1.order.settlementWeight = <any>(
|
model1.order.settlementWeight = <any>num_subtract(<any>model1.order.settlementNet, model1.order.subtractNum).toFixed(2)
|
||||||
num_subtract(
|
// model1.order.settlementNet - model1.order.subtractNum;
|
||||||
<any>model1.order.settlementNet,
|
|
||||||
model1.order.subtractNum
|
|
||||||
).toFixed(2)
|
|
||||||
);
|
|
||||||
// model1.order.settlementNet - model1.order.subtractNum;
|
|
||||||
} else {
|
} else {
|
||||||
model1.order.settlementWeight = model1.order.settlementNet;
|
model1.order.settlementWeight = model1.order.settlementNet;
|
||||||
}
|
}
|
||||||
} else if (model1.order.buttonType === 1) {
|
} else if (model1.order.buttonType === 1) {
|
||||||
if (model1.order.subtractNum) {
|
if (model1.order.subtractNum) {
|
||||||
model1.order.settlementWeight = <any>(
|
model1.order.settlementWeight = <any>num_multiply(<any>model1.order.settlementNet, ((100 - model1.order.subtractNum) / 100)).toFixed(2)
|
||||||
num_multiply(
|
|
||||||
<any>model1.order.settlementNet,
|
|
||||||
(100 - model1.order.subtractNum) / 100
|
|
||||||
).toFixed(2)
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
model1.order.settlementWeight = model1.order.settlementNet;
|
model1.order.settlementWeight = model1.order.settlementNet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
model1.order.estimatePrice = <any>(
|
model1.order.estimatePrice = <any>num_multiply((model1.order.unitPrice || 0),(model1.order.settlementWeight || 0)).toFixed(2)
|
||||||
num_multiply(
|
|
||||||
model1.order.unitPrice || 0,
|
|
||||||
model1.order.settlementWeight || 0
|
|
||||||
).toFixed(2)
|
|
||||||
);
|
|
||||||
// if (!model1.order.totalPrice) {
|
// if (!model1.order.totalPrice) {
|
||||||
// model1.order.totalPrice = model1.order.estimatePrice;
|
// model1.order.totalPrice = model1.order.estimatePrice;
|
||||||
// }
|
// }
|
||||||
|
@ -776,12 +754,8 @@ onLoad((option) => {
|
||||||
fileLists: model1.order.fileLists.map((item: any) => {
|
fileLists: model1.order.fileLists.map((item: any) => {
|
||||||
return { ...item, fileID: item.id };
|
return { ...item, fileID: item.id };
|
||||||
}),
|
}),
|
||||||
settlementUnit:
|
settlementUnit: 1,
|
||||||
res.data.settlementUnit !== null ? res.data.settlementUnit : 1,
|
|
||||||
settlementWeight: res.data.settlementWeight,
|
|
||||||
estimatePrice: res.data.estimatePrice,
|
|
||||||
};
|
};
|
||||||
recordSettlementUnit.value = model1.order.settlementUnit;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -236,7 +236,10 @@ const contrlModalParams = reactive<{ [attrName: string]: any }>({
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const state = reactive<any>({
|
const state = reactive<{
|
||||||
|
order: Shipment;
|
||||||
|
[attrName: string]: any;
|
||||||
|
}>({
|
||||||
order: {
|
order: {
|
||||||
id: "",
|
id: "",
|
||||||
buttonType: 0,
|
buttonType: 0,
|
||||||
|
|
Loading…
Reference in New Issue