|
@@ -11,7 +11,11 @@
|
|
|
v-for="(item, index) in selectList"
|
|
v-for="(item, index) in selectList"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
>
|
|
>
|
|
|
- <image class="item-icon" :src="item.cover" alt="商品图" />
|
|
|
|
|
|
|
+ <image
|
|
|
|
|
+ class="item-icon"
|
|
|
|
|
+ :src="item.cover"
|
|
|
|
|
+ alt="商品图"
|
|
|
|
|
+ />
|
|
|
|
|
|
|
|
<view class="item-info">
|
|
<view class="item-info">
|
|
|
<view class="info-line">
|
|
<view class="info-line">
|
|
@@ -40,7 +44,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="summary-bar">
|
|
<view class="summary-bar">
|
|
|
- <view class="operate-view" @click="gobackEvent">
|
|
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="operate-view"
|
|
|
|
|
+ @click="gobackEvent"
|
|
|
|
|
+ >
|
|
|
<text class="iconfont icongouwuche"></text>
|
|
<text class="iconfont icongouwuche"></text>
|
|
|
重选花材
|
|
重选花材
|
|
|
</view>
|
|
</view>
|
|
@@ -61,14 +68,23 @@
|
|
|
@click="showCustomer = true"
|
|
@click="showCustomer = true"
|
|
|
>
|
|
>
|
|
|
<view class="tui-title">客户</view>
|
|
<view class="tui-title">客户</view>
|
|
|
- <view class="tui-input" v-if="form.customId">{{
|
|
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="tui-input"
|
|
|
|
|
+ v-if="form.customId"
|
|
|
|
|
+ >{{
|
|
|
form.customName
|
|
form.customName
|
|
|
}}</view>
|
|
}}</view>
|
|
|
- <view class="tui-placeholder" style="width: 100%" v-else
|
|
|
|
|
- >请选择客户</view
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="tui-placeholder"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ v-else
|
|
|
|
|
+ >请选择客户</view>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
|
|
|
|
+ <tui-list-cell
|
|
|
|
|
+ class="line-cell"
|
|
|
|
|
+ :hover="false"
|
|
|
|
|
+ :arrow="false"
|
|
|
|
|
+ >
|
|
|
<view class="tui-title">送货</view>
|
|
<view class="tui-title">送货</view>
|
|
|
<button
|
|
<button
|
|
|
@tap="courier(2)"
|
|
@tap="courier(2)"
|
|
@@ -102,7 +118,11 @@
|
|
|
placeholder-class="tui-placeholder"
|
|
placeholder-class="tui-placeholder"
|
|
|
/>
|
|
/>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
|
|
|
|
+ <tui-list-cell
|
|
|
|
|
+ class="line-cell"
|
|
|
|
|
+ :hover="false"
|
|
|
|
|
+ :arrow="false"
|
|
|
|
|
+ >
|
|
|
<view class="tui-title">付款方式</view>
|
|
<view class="tui-title">付款方式</view>
|
|
|
<button
|
|
<button
|
|
|
v-if="form.customId"
|
|
v-if="form.customId"
|
|
@@ -130,18 +150,30 @@
|
|
|
}}</text>
|
|
}}</text>
|
|
|
<text class="price-number">
|
|
<text class="price-number">
|
|
|
¥
|
|
¥
|
|
|
- <text class="large" v-if="form.sendType == 1">{{
|
|
|
|
|
|
|
+ <text
|
|
|
|
|
+ class="large"
|
|
|
|
|
+ v-if="form.sendType == 1"
|
|
|
|
|
+ >{{
|
|
|
allPrice + Number(form.sendCost)
|
|
allPrice + Number(form.sendCost)
|
|
|
}}</text>
|
|
}}</text>
|
|
|
- <text class="large" v-else>{{ allPrice }}</text>
|
|
|
|
|
|
|
+ <text
|
|
|
|
|
+ class="large"
|
|
|
|
|
+ v-else
|
|
|
|
|
+ >{{ allPrice }}</text>
|
|
|
</text>
|
|
</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <button class="admin-button-com blue middle" @click="affirmFormSubmit">
|
|
|
|
|
|
|
+ <button
|
|
|
|
|
+ class="admin-button-com blue middle"
|
|
|
|
|
+ @click="affirmFormSubmit"
|
|
|
|
|
+ >
|
|
|
开单
|
|
开单
|
|
|
</button>
|
|
</button>
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 选择客户 -->
|
|
<!-- 选择客户 -->
|
|
|
- <AppCustomerSel :show.sync="showCustomer" @change="changeCustomerFn" />
|
|
|
|
|
|
|
+ <AppCustomerSel
|
|
|
|
|
+ :show.sync="showCustomer"
|
|
|
|
|
+ @change="changeCustomerFn"
|
|
|
|
|
+ />
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -175,7 +207,7 @@ export default {
|
|
|
appFormSend,
|
|
appFormSend,
|
|
|
},
|
|
},
|
|
|
mixins: [productMins],
|
|
mixins: [productMins],
|
|
|
- data() {
|
|
|
|
|
|
|
+ data () {
|
|
|
return {
|
|
return {
|
|
|
autoLoad: false,
|
|
autoLoad: false,
|
|
|
form: {
|
|
form: {
|
|
@@ -203,7 +235,7 @@ export default {
|
|
|
showCustomer: false,
|
|
showCustomer: false,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
- onLoad() {
|
|
|
|
|
|
|
+ onLoad () {
|
|
|
if (!this.getMerchantInfo) {
|
|
if (!this.getMerchantInfo) {
|
|
|
this.initMerchantInfo().then((data) => {
|
|
this.initMerchantInfo().then((data) => {
|
|
|
uni.setNavigationBarTitle({
|
|
uni.setNavigationBarTitle({
|
|
@@ -221,13 +253,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
...mapActions(["initMerchantInfo"]),
|
|
...mapActions(["initMerchantInfo"]),
|
|
|
- init() {
|
|
|
|
|
|
|
+ init () {
|
|
|
this._getDet();
|
|
this._getDet();
|
|
|
},
|
|
},
|
|
|
- countAllPrices(e) {
|
|
|
|
|
|
|
+ countAllPrices (e) {
|
|
|
this.allPrices = this.allPrices + Number(this.form.sendCost);
|
|
this.allPrices = this.allPrices + Number(this.form.sendCost);
|
|
|
},
|
|
},
|
|
|
- courier(type) {
|
|
|
|
|
|
|
+ courier (type) {
|
|
|
this.form.sendType = type;
|
|
this.form.sendType = type;
|
|
|
if (type === 2) {
|
|
if (type === 2) {
|
|
|
this.form.sendCost = "";
|
|
this.form.sendCost = "";
|
|
@@ -235,13 +267,13 @@ export default {
|
|
|
this.form.sendCost = this.money;
|
|
this.form.sendCost = this.money;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- sendCostBlur() {
|
|
|
|
|
|
|
+ sendCostBlur () {
|
|
|
if (this.form.sendType === 1) {
|
|
if (this.form.sendType === 1) {
|
|
|
this.money = this.form.sendCost;
|
|
this.money = this.form.sendCost;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// api
|
|
// api
|
|
|
- _getDet() {
|
|
|
|
|
|
|
+ _getDet () {
|
|
|
let data = uni.getStorageSync("modifyShopB");
|
|
let data = uni.getStorageSync("modifyShopB");
|
|
|
if (this.$util.isEmpty(data)) return;
|
|
if (this.$util.isEmpty(data)) return;
|
|
|
Object.keys(this.form).forEach((i, index) => {
|
|
Object.keys(this.form).forEach((i, index) => {
|
|
@@ -251,7 +283,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- changeCustomerFn(info) {
|
|
|
|
|
|
|
+ changeCustomerFn (info) {
|
|
|
console.log(info, "this.form");
|
|
console.log(info, "this.form");
|
|
|
const product = this.selectList.map((ele) => {
|
|
const product = this.selectList.map((ele) => {
|
|
|
return {
|
|
return {
|
|
@@ -274,12 +306,13 @@ export default {
|
|
|
};
|
|
};
|
|
|
freight(params).then((res) => {
|
|
freight(params).then((res) => {
|
|
|
this.form.sendCost = res.data.sedCost;
|
|
this.form.sendCost = res.data.sedCost;
|
|
|
|
|
+ this.money = res.data.sedCost
|
|
|
});
|
|
});
|
|
|
this.form.customId = info.id;
|
|
this.form.customId = info.id;
|
|
|
this.form.customName = info.name;
|
|
this.form.customName = info.name;
|
|
|
this.form.debt = 1;
|
|
this.form.debt = 1;
|
|
|
},
|
|
},
|
|
|
- confirmFn(options) {
|
|
|
|
|
|
|
+ confirmFn (options) {
|
|
|
if (options.sendType == 2) {
|
|
if (options.sendType == 2) {
|
|
|
options.sendCost = "";
|
|
options.sendCost = "";
|
|
|
}
|
|
}
|
|
@@ -292,13 +325,13 @@ export default {
|
|
|
let url = `/admin/billing/result?orderId=${id}&orderSn=${orderSn}`;
|
|
let url = `/admin/billing/result?orderId=${id}&orderSn=${orderSn}`;
|
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
|
url: url,
|
|
url: url,
|
|
|
- success: (result) => {},
|
|
|
|
|
- fail: () => {},
|
|
|
|
|
- complete: () => {},
|
|
|
|
|
|
|
+ success: (result) => { },
|
|
|
|
|
+ fail: () => { },
|
|
|
|
|
+ complete: () => { },
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- affirmFormSubmit() {
|
|
|
|
|
|
|
+ affirmFormSubmit () {
|
|
|
let rules = [
|
|
let rules = [
|
|
|
{
|
|
{
|
|
|
name: "customId",
|
|
name: "customId",
|
|
@@ -324,7 +357,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
// 表单验证
|
|
// 表单验证
|
|
|
- async formSubmit(e) {
|
|
|
|
|
|
|
+ async formSubmit (e) {
|
|
|
try {
|
|
try {
|
|
|
// 进行表单检查
|
|
// 进行表单检查
|
|
|
this.form;
|
|
this.form;
|
|
@@ -359,7 +392,7 @@ export default {
|
|
|
console.log(999999, error);
|
|
console.log(999999, error);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- gobackEvent() {
|
|
|
|
|
|
|
+ gobackEvent () {
|
|
|
uni.navigateBack({
|
|
uni.navigateBack({
|
|
|
delta: 1,
|
|
delta: 1,
|
|
|
});
|
|
});
|