|
|
@@ -54,22 +54,29 @@
|
|
|
<view class="module-com input-line-wrap">
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
<view class="tui-title ">客户</view>
|
|
|
- <view class="tui-input" v-if="form.customId">
|
|
|
- {{ form.customName }}
|
|
|
- </view>
|
|
|
- <view class="tui-placeholder" v-else @click="showCustomer = true"
|
|
|
- >请选择客户</view
|
|
|
- >
|
|
|
+ <view class="tui-input" v-if="form.customId" @click="showCustomer = true">{{ form.customName }}</view>
|
|
|
+ <view class="tui-placeholder" style="width: 100%" v-else @click="showCustomer = true">请选择客户</view>
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
+ <view class="tui-title ">运费</view>
|
|
|
+ <input type="number" placeholder="留空表示免运费" @input="countAllPrices" v-model="form.sendCost" placeholder-class="tui-placeholder">
|
|
|
</tui-list-cell>
|
|
|
- <appFormSend :form.sync="form"> </appFormSend>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
+ <view class="tui-title ">结算方式</view>
|
|
|
+ <button @tap="form.clearType=1" class="admin-button-com mini-btn" :class="form.clearType==1?'blue':'default'">欠款</button>
|
|
|
+ <button @click="form.clearType=2" class="admin-button-com mini-btn" :class="form.clearType==2?'blue':'default'">已收款</button>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
+
|
|
|
+<!-- <appFormSend :form.sync="form"> </appFormSend>-->
|
|
|
</view>
|
|
|
</form>
|
|
|
</view>
|
|
|
<view class="under-bar">
|
|
|
<view class="price-view">
|
|
|
- <text class="price-title">收款</text>
|
|
|
+ <text class="price-title">{{ form.clearType==1?'欠款':'已收款' }}</text>
|
|
|
<text class="price-number">
|
|
|
- ¥ <text class="large">{{ allPrice }}</text>
|
|
|
+ ¥ <text class="large">{{ allPrice+Number(form.sendCost) }}</text>
|
|
|
</text>
|
|
|
</view>
|
|
|
<button class="admin-button-com blue middle" @click="formSubmit">
|
|
|
@@ -114,6 +121,7 @@ export default {
|
|
|
return {
|
|
|
autoLoad: false,
|
|
|
form: {
|
|
|
+ clearType:1,//结算方式 1欠款 2已付款
|
|
|
shopId: "",
|
|
|
shopName: "",
|
|
|
receiveProvince: "",
|
|
|
@@ -157,6 +165,14 @@ export default {
|
|
|
init() {
|
|
|
this._getDet();
|
|
|
},
|
|
|
+ countAllPrices(e){
|
|
|
+ this.allPrices = this.allPrices+Number(this.form.sendCost)
|
|
|
+ console.log('e',e)
|
|
|
+ console.log('this.form.sendCost',Number(this.form.sendCost))
|
|
|
+ console.log('this.form.sendCost',this.form.sendCost)
|
|
|
+ console.log('this.allPrices',this.allPrices)
|
|
|
+ },
|
|
|
+
|
|
|
// api
|
|
|
_getDet() {
|
|
|
let data = uni.getStorageSync("modifyShopB");
|
|
|
@@ -196,37 +212,8 @@ export default {
|
|
|
// 表单验证
|
|
|
async formSubmit(e) {
|
|
|
try {
|
|
|
- // 表单规则
|
|
|
- let rules = [
|
|
|
- {
|
|
|
- name: "sendTime",
|
|
|
- rule: ["required"],
|
|
|
- msg: ["请输入具体时间"]
|
|
|
- }
|
|
|
- ];
|
|
|
// 进行表单检查
|
|
|
let formData = this.form;
|
|
|
- if (formData.sendType == "1") {
|
|
|
- } else {
|
|
|
- let temp = [
|
|
|
- {
|
|
|
- name: "receiveProvince",
|
|
|
- rule: ["required"],
|
|
|
- msg: ["请选择地址"]
|
|
|
- },
|
|
|
- {
|
|
|
- name: "receiveAddress",
|
|
|
- rule: ["required"],
|
|
|
- msg: ["请填写详细地址"]
|
|
|
- },
|
|
|
- {
|
|
|
- name: "receiveFloor",
|
|
|
- rule: ["required"],
|
|
|
- msg: ["请输入门牌号"]
|
|
|
- }
|
|
|
- ];
|
|
|
- rules = rules.concat(temp);
|
|
|
- }
|
|
|
|
|
|
const product = this.selectList.map(ele => {
|
|
|
return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount };
|
|
|
@@ -236,11 +223,11 @@ export default {
|
|
|
await this.initMerchantInfo();
|
|
|
}
|
|
|
formData.shopId = this.getMerchantInfo.id;
|
|
|
- if (this.waySele == 1) {
|
|
|
- formData.sendCost = "免运费";
|
|
|
- }
|
|
|
+
|
|
|
console.log(9999, formData);
|
|
|
- let checkRes = formUtil.validation(formData, rules);
|
|
|
+ // this.confirmFn(formData);
|
|
|
+ // let rules = rules.concat(temp);
|
|
|
+ let checkRes = formUtil.validation(formData, []);
|
|
|
// 验证通过!
|
|
|
if (!checkRes) {
|
|
|
this.confirmFn(formData);
|
|
|
@@ -261,6 +248,9 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.admin-button-com {
|
|
|
+ margin-right: 20upx;
|
|
|
+}
|
|
|
.affirm-page {
|
|
|
position: relative;
|
|
|
height: 100%;
|