|
@@ -94,7 +94,7 @@
|
|
|
v-model="ruleForm.good_code"
|
|
|
placeholder="请选择商品"
|
|
|
readonly
|
|
|
- maxlength="200"
|
|
|
+ maxlength="200"
|
|
|
@focus="change_good_code"
|
|
|
/>
|
|
|
<show-data-table
|
|
@@ -193,7 +193,7 @@
|
|
|
<el-input
|
|
|
v-model="ruleForm.activity_stock"
|
|
|
disabled
|
|
|
- maxlength="200"
|
|
|
+ maxlength="200"
|
|
|
placeholder="剩余库存"
|
|
|
/> </el-form-item
|
|
|
></el-col>
|
|
@@ -293,7 +293,7 @@
|
|
|
<el-input
|
|
|
v-model="ruleForm.good_price"
|
|
|
disabled
|
|
|
- maxlength="20"
|
|
|
+ maxlength="20"
|
|
|
v-loading="priceLoding"
|
|
|
>
|
|
|
<template slot="append">元</template></el-input
|
|
@@ -398,7 +398,7 @@
|
|
|
<el-input
|
|
|
v-model="scope.row.receipt_quantity"
|
|
|
placeholder="收货总数"
|
|
|
- maxlength="20"
|
|
|
+ maxlength="20"
|
|
|
:disabled="!scope.row.edit"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -425,7 +425,7 @@
|
|
|
<el-input
|
|
|
v-model="scope.row.contactor"
|
|
|
placeholder="收件联系人"
|
|
|
- maxlength="20"
|
|
|
+ maxlength="20"
|
|
|
:disabled="!scope.row.edit"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -450,7 +450,7 @@
|
|
|
<el-input
|
|
|
v-model="scope.row.mobile"
|
|
|
placeholder="收货联系电话"
|
|
|
- maxlength="11"
|
|
|
+ maxlength="11"
|
|
|
:disabled="!scope.row.edit"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -502,7 +502,7 @@
|
|
|
<el-input
|
|
|
v-model="scope.row.addr"
|
|
|
placeholder="详细地址"
|
|
|
- maxlength="100"
|
|
|
+ maxlength="100"
|
|
|
:disabled="!scope.row.edit"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -612,7 +612,9 @@
|
|
|
justify-content: space-between;
|
|
|
"
|
|
|
>
|
|
|
- <p>订单总金额:{{accMul(ruleForm.good_num,ruleForm.good_price ) || 0 }}</p>
|
|
|
+ <p>
|
|
|
+ 订单总金额:{{ accMul(ruleForm.good_num, ruleForm.good_price) || 0 }}
|
|
|
+ </p>
|
|
|
<el-button :size="'mini'" type="primary" @click="submitForm"
|
|
|
>保 存
|
|
|
</el-button>
|
|
@@ -629,10 +631,14 @@ import inAddrModel from "@/components/in-addr-model";
|
|
|
import showVoucherModel from "@/components/show-voucher-model";
|
|
|
import searchGoodOnlineModal from "@/components/search-good-online-modal";
|
|
|
import { addColumns } from "./ShowDataTableColumns";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
name: "salesOrderDetail",
|
|
|
mixins: [mixinPage, resToken],
|
|
|
props: ["newTime", "id", "sitem", "type"],
|
|
|
+ computed: {
|
|
|
+ ...mapGetters(["business_companyNo"]),
|
|
|
+ },
|
|
|
components: {
|
|
|
inAddrModel,
|
|
|
showVoucherModel,
|
|
@@ -878,23 +884,23 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.initForm();
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
//乘法精度问题
|
|
|
accMul(arg1, arg2) {
|
|
|
- var m = 0, s1 = arg1.toString(), s2 = arg2.toString();
|
|
|
- try {
|
|
|
- m += s1.split(".")[1].length;
|
|
|
- }
|
|
|
- catch (e) {
|
|
|
- }
|
|
|
- try {
|
|
|
- m += s2.split(".")[1].length;
|
|
|
- }
|
|
|
- catch (e) {
|
|
|
- }
|
|
|
- return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
|
|
|
+ var m = 0,
|
|
|
+ s1 = arg1.toString(),
|
|
|
+ s2 = arg2.toString();
|
|
|
+ try {
|
|
|
+ m += s1.split(".")[1].length;
|
|
|
+ } catch (e) {}
|
|
|
+ try {
|
|
|
+ m += s2.split(".")[1].length;
|
|
|
+ } catch (e) {}
|
|
|
+ return (
|
|
|
+ (Number(s1.replace(".", "")) * Number(s2.replace(".", ""))) /
|
|
|
+ Math.pow(10, m)
|
|
|
+ );
|
|
|
},
|
|
|
async initForm() {
|
|
|
this.status = "";
|
|
@@ -916,7 +922,7 @@ export default {
|
|
|
|
|
|
this.ruleForm = {
|
|
|
order_type: "1",
|
|
|
- supplierNo: "", //销售方编码
|
|
|
+ supplierNo: this.business_companyNo || "", //销售方编码
|
|
|
customer_code: [], // 企业客户选择
|
|
|
platform_id: "",
|
|
|
arrtime: "", //要求到货时间
|
|
@@ -1043,7 +1049,7 @@ export default {
|
|
|
});
|
|
|
if (code === 0) {
|
|
|
this.goods_sitem = data;
|
|
|
- console.log("1111111111111111",this.goods_sitem)
|
|
|
+ console.log("1111111111111111", this.goods_sitem);
|
|
|
this.goods_sitem.good_info_img =
|
|
|
this.goods_sitem.good_info_img.split(",");
|
|
|
const { weight } = this.goods_sitem;
|
|
@@ -1099,9 +1105,9 @@ export default {
|
|
|
const { goodtype, good_num } = this.ruleForm;
|
|
|
|
|
|
let oldGood_type = goodtype.length === 2 ? goodtype[1] : "";
|
|
|
-
|
|
|
- if(oldGood_type == 2 || oldGood_type == 3){
|
|
|
- this.ruleForm.good_price = 0
|
|
|
+
|
|
|
+ if (oldGood_type == 2 || oldGood_type == 3) {
|
|
|
+ this.ruleForm.good_price = 0;
|
|
|
}
|
|
|
|
|
|
const { ogood_type, ogood_num } = this.order_good_num;
|
|
@@ -1357,15 +1363,14 @@ export default {
|
|
|
const { sale_price } = data;
|
|
|
resModel.price = sale_price + "";
|
|
|
|
|
|
- let oldGood_type = goodtype.length === 2 ? goodtype[1] : "";
|
|
|
-
|
|
|
- if(key_0 === "is_activity_0" && (oldGood_type == 2 || oldGood_type == 3)){
|
|
|
- resModel.price = 0+ ""
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+ let oldGood_type = goodtype.length === 2 ? goodtype[1] : "";
|
|
|
|
|
|
-
|
|
|
+ if (
|
|
|
+ key_0 === "is_activity_0" &&
|
|
|
+ (oldGood_type == 2 || oldGood_type == 3)
|
|
|
+ ) {
|
|
|
+ resModel.price = 0 + "";
|
|
|
+ }
|
|
|
} else if (code >= 100 && code <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|