|
|
@@ -12,22 +12,17 @@
|
|
|
<view class="info-line">
|
|
|
<text class="item-name">{{ item.itemName }}</text>
|
|
|
<text class="item-price">
|
|
|
- <text class="unit">¥</text>
|
|
|
+ <text class="unit"></text>
|
|
|
<text class="price">
|
|
|
- {{ item.userPrice }}
|
|
|
+ <text v-if="item.bigCount > 0 || item.smallCount > 0">{{`${item.bigCount}`}}扎</text>
|
|
|
+ <text v-if="item.smallCount > 0">/</text>
|
|
|
+ <text v-if="item.smallCount > 0">{{`${item.smallCount}`}}支</text>
|
|
|
</text>
|
|
|
</text>
|
|
|
</view>
|
|
|
<view class="info-line">
|
|
|
- <text class="item-type">{{ item.rank }}级</text>
|
|
|
+ <text class="item-type"></text>
|
|
|
<text class="item-count">
|
|
|
- <text v-if="item.bigCount > 0 || item.smallCount > 0">{{
|
|
|
- `${item.bigCount}`
|
|
|
- }}</text>
|
|
|
- <text v-if="item.smallCount > 0">/</text>
|
|
|
- <text v-if="item.smallCount > 0">{{
|
|
|
- `${item.smallCount}`
|
|
|
- }}</text>
|
|
|
</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -39,7 +34,7 @@
|
|
|
重选花材
|
|
|
</view>
|
|
|
<view class="describe-view">
|
|
|
- 共{{ selectList.length }}种,合计 ¥<text class="price">{{ allPrice }}</text>
|
|
|
+ 共{{ selectList.length }}种</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -74,7 +69,7 @@ import appAddressGroup from "@/components/app-address-group";
|
|
|
import appSendTime from "@/components/app-send-time";
|
|
|
import appFormSend from "@/components/app-form-send";
|
|
|
const formUtil = require("@/utils/formValidation.js");
|
|
|
-import { createOrder, freight,wastage,updateOrder } from "@/api/order/index";
|
|
|
+import { wastage } from "@/api/order/index";
|
|
|
import { mapActions, mapGetters } from "vuex";
|
|
|
export default {
|
|
|
name: "BillingAffirm", // 开单确认
|
|
|
@@ -96,7 +91,7 @@ export default {
|
|
|
payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
|
|
|
payWayindex:0,
|
|
|
form: {
|
|
|
- debt: 1, //付款方式 1欠款订单 0正常订单
|
|
|
+ debt: 1,
|
|
|
shopId: "",
|
|
|
shopName: "",
|
|
|
receiveProvince: "",
|
|
|
@@ -114,10 +109,9 @@ export default {
|
|
|
product: "",
|
|
|
remark:"",
|
|
|
payWay:0,
|
|
|
- needPrint:1,//订单生成时打印订单1需要2不需要
|
|
|
+ needPrint:1,
|
|
|
},
|
|
|
money: "",
|
|
|
- modifyPrice: 0,
|
|
|
showCustomer: false,
|
|
|
pageType: "wastage",
|
|
|
};
|
|
|
@@ -134,7 +128,6 @@ export default {
|
|
|
title: this.getMerchantInfo.name,
|
|
|
});
|
|
|
}
|
|
|
- this.modifyPrice = this.allPrice.toFixed(2);
|
|
|
this.courier(2);
|
|
|
if(option.customId){
|
|
|
this.form.customId = option.customId
|
|
|
@@ -158,22 +151,12 @@ export default {
|
|
|
...mapActions(["initMerchantInfo"]),
|
|
|
init () {
|
|
|
this._getDet();
|
|
|
- },
|
|
|
- selectCustom(){
|
|
|
- //已经有选客户流程,不能修改
|
|
|
- this.$msg('客户不能修改');
|
|
|
- //this.$util.pageTo({ url: '/admin/custom/selectCustom',query: {style:2}})
|
|
|
},
|
|
|
payWayChange(e){
|
|
|
let index = e.detail.value
|
|
|
this.payWayindex = index
|
|
|
this.form.payWay = this.payWayList[index].id
|
|
|
},
|
|
|
- countAllPrices (e) {
|
|
|
- this.allPrices = this.allPrices + Number(this.form.sendCost);
|
|
|
- let allPrices = this.allPrice.toFixed(2)
|
|
|
- this.modifyPrice = (Number(allPrices) + Number(this.form.sendCost)).toFixed(2);
|
|
|
- },
|
|
|
setPayWay(payWay){
|
|
|
this.form.payWay = payWay
|
|
|
},
|
|
|
@@ -222,108 +205,34 @@ export default {
|
|
|
this.form.customName = info.name;
|
|
|
},
|
|
|
affirmFormSubmit () {
|
|
|
- let self = this;
|
|
|
- if(this.isBilling){
|
|
|
- let rules = [
|
|
|
- {
|
|
|
- name: "customId",
|
|
|
- rule: ["required"],
|
|
|
- msg: ["请选择客户"],
|
|
|
- },
|
|
|
- ];
|
|
|
- let checkRes = formUtil.validation(this.form, rules);
|
|
|
- if (checkRes) {
|
|
|
- this.$msg(checkRes);
|
|
|
- return false;
|
|
|
- }
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: "确认打印订单?",
|
|
|
- cancelText: "不需要",
|
|
|
- confirmText: "打印",
|
|
|
- confirmColor: '#39B54A',
|
|
|
- cancelColor: '#777777',
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- self.form.needPrint = 1
|
|
|
- self.formSubmit();
|
|
|
- }else{
|
|
|
- self.form.needPrint = 2
|
|
|
- self.formSubmit();
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
- }else{
|
|
|
- let price = 0;
|
|
|
- let that = this
|
|
|
- let product = this.selectList.map((ele) => {
|
|
|
- price += ele.bigCount * Number(ele.bigPrice);
|
|
|
- price += ele.smallCount * Number(ele.smallPrice);
|
|
|
- return {
|
|
|
- productId: ele.id,
|
|
|
- bigNum: ele.bigCount,
|
|
|
- smallNum: ele.smallCount,
|
|
|
- classId: ele.classId,
|
|
|
- itemId: ele.itemId,
|
|
|
- price: ele.userPrice>0?ele.userPrice:price,
|
|
|
- };
|
|
|
- });
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: "确认报损?",
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- wastage({product:JSON.stringify(product),remark:that.form.remark}).then((res) => {
|
|
|
- //删除记忆
|
|
|
- that.removeMemory()
|
|
|
- const {data: { id, orderSn },} = res;
|
|
|
- let url = '/admin/breakage/result';
|
|
|
- uni.redirectTo({url: url,success: (result) => { },fail: () => { },complete: () => { },});
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- // 表单验证
|
|
|
- async formSubmit () {
|
|
|
- try {
|
|
|
- // 进行表单检查
|
|
|
- this.form;
|
|
|
- let formData = this.form;
|
|
|
- let price = 0;
|
|
|
- const product = this.selectList.map((ele) => {
|
|
|
- price += ele.bigCount * Number(ele.bigPrice);
|
|
|
- price += ele.smallCount * Number(ele.smallPrice);
|
|
|
- return {
|
|
|
- productId: ele.id,
|
|
|
- bigNum: ele.bigCount,
|
|
|
- smallNum: ele.smallCount,
|
|
|
- classId: ele.classId,
|
|
|
- itemId: ele.itemId,
|
|
|
- price: ele.userPrice>0?ele.userPrice:price,
|
|
|
- };
|
|
|
- });
|
|
|
- formData.product = JSON.stringify(product);
|
|
|
- if (!this.getMerchantInfo) {
|
|
|
- await this.initMerchantInfo();
|
|
|
- }
|
|
|
- formData.shopId = this.getMerchantInfo.id;
|
|
|
- let checkRes = formUtil.validation(formData, []);
|
|
|
- // 验证通过!
|
|
|
- if (!checkRes) {
|
|
|
-
|
|
|
- } else {
|
|
|
- this.$msg(checkRes);
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
- console.log(999999, error);
|
|
|
- }
|
|
|
+ let that = this
|
|
|
+ let product = this.selectList.map((ele) => {
|
|
|
+ return {
|
|
|
+ productId: ele.id,
|
|
|
+ bigNum: ele.bigCount,
|
|
|
+ smallNum: ele.smallCount,
|
|
|
+ classId: ele.classId,
|
|
|
+ itemId: ele.itemId
|
|
|
+ };
|
|
|
+ });
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: "确认报损?",
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ wastage({product:JSON.stringify(product),remark:that.form.remark}).then((res) => {
|
|
|
+ //删除记忆
|
|
|
+ that.removeMemory()
|
|
|
+ const {data: { id, orderSn },} = res;
|
|
|
+ let url = '/admin/breakage/result';
|
|
|
+ uni.redirectTo({url: url,success: (result) => { },fail: () => { },complete: () => { },});
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
},
|
|
|
gobackEvent () {
|
|
|
- uni.navigateBack({
|
|
|
- delta: 1,
|
|
|
- });
|
|
|
+ uni.navigateBack({delta: 1,})
|
|
|
},
|
|
|
},
|
|
|
};
|