|
@@ -2,6 +2,14 @@
|
|
<!-- #ifdef H5 -->
|
|
<!-- #ifdef H5 -->
|
|
<zj-page-layout :hasFooter="true">
|
|
<zj-page-layout :hasFooter="true">
|
|
<view class="form-container">
|
|
<view class="form-container">
|
|
|
|
+ <!-- <view class="item" @tap="isShowBrandDialog = true">
|
|
|
|
+ <view class="label"><text>*</text>品牌</view>
|
|
|
|
+ <view class="picker">
|
|
|
|
+ <text class="value" v-if="brand">{{brand.brandName}}</text>
|
|
|
|
+ <text class="placeholder" v-else>请选择</text>
|
|
|
|
+ <text class="iconfont icon-jinru"></text>
|
|
|
|
+ </view>
|
|
|
|
+ </view> -->
|
|
<view class="item" v-if="type == 'P'" @tap="isShowCategoryDialog = true">
|
|
<view class="item" v-if="type == 'P'" @tap="isShowCategoryDialog = true">
|
|
<view class="label"><text>*</text>产品大类</view>
|
|
<view class="label"><text>*</text>产品大类</view>
|
|
<view class="picker">
|
|
<view class="picker">
|
|
@@ -10,10 +18,24 @@
|
|
<text class="iconfont icon-jinru"></text>
|
|
<text class="iconfont icon-jinru"></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- <view class="item">
|
|
|
|
+ <view class="label"><text>*</text>销售方式</view>
|
|
|
|
+ <u-radio-group v-model="salesType">
|
|
|
|
+ <u-radio shape="circle" label="外购" :name="'OUT'"></u-radio>
|
|
|
|
+ <u-radio shape="circle" label="自有仓库" :name="'OWN'"></u-radio>
|
|
|
|
+ </u-radio-group>
|
|
|
|
+ </view> -->
|
|
<u-gap height="10" bgColor="#F7F8FF"></u-gap>
|
|
<u-gap height="10" bgColor="#F7F8FF"></u-gap>
|
|
<view class="item">
|
|
<view class="item">
|
|
<view class="label"><text>*</text>客户电话</view>
|
|
<view class="label"><text>*</text>客户电话</view>
|
|
- <u--input :maxlength="11" placeholder="请输入" border="none" inputAlign="right" v-model="userMobile"></u--input>
|
|
|
|
|
|
+ <!-- :readonly="hasOid" -->
|
|
|
|
+ <u--input
|
|
|
|
+ :maxlength="11"
|
|
|
|
+ placeholder="请输入"
|
|
|
|
+ border="none"
|
|
|
|
+ inputAlign="right"
|
|
|
|
+ v-model="userMobile"
|
|
|
|
+ ></u--input>
|
|
</view>
|
|
</view>
|
|
<view class="item">
|
|
<view class="item">
|
|
<view class="label">工单单号</view>
|
|
<view class="label">工单单号</view>
|
|
@@ -27,65 +49,6 @@
|
|
<text class="iconfont icon-jinru"></text>
|
|
<text class="iconfont icon-jinru"></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <!-- ------------------------------------ -->
|
|
|
|
- <view v-for="(item, index) in peijianList" :key="index">
|
|
|
|
- <u-gap height="10" bgColor="#F7F8FF"></u-gap>
|
|
|
|
- <view class="item">
|
|
|
|
- <view class="label" style="font-weight: bold">配件信息{{ index + 1 }}</view>
|
|
|
|
- <view class="label" style="color: red; margin-right: 10rpx" @click="delpeijian(index)">删除</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="item">
|
|
|
|
- <view class="label"><text>*</text>是否质量问题</view>
|
|
|
|
- <u--input
|
|
|
|
- :maxlength="11"
|
|
|
|
- placeholder="请输入"
|
|
|
|
- border="none"
|
|
|
|
- inputAlign="right"
|
|
|
|
- v-model="userMobile"
|
|
|
|
- ></u--input>
|
|
|
|
- </view>
|
|
|
|
- <view class="item">
|
|
|
|
- <view class="label"><text>*</text>旧配件编号</view>
|
|
|
|
- <u--input
|
|
|
|
- :readonly="hasOid"
|
|
|
|
- placeholder="请输入"
|
|
|
|
- border="none"
|
|
|
|
- inputAlign="right"
|
|
|
|
- v-model="orderNo"
|
|
|
|
- ></u--input>
|
|
|
|
- </view>
|
|
|
|
- <view class="item">
|
|
|
|
- <view class="label"><text>*</text>旧配件名称</view>
|
|
|
|
- <u--input
|
|
|
|
- :readonly="hasOid"
|
|
|
|
- placeholder="请输入"
|
|
|
|
- border="none"
|
|
|
|
- inputAlign="right"
|
|
|
|
- v-model="orderNo"
|
|
|
|
- ></u--input>
|
|
|
|
- </view>
|
|
|
|
- <view class="item" @tap="toChooseProduct(index)">
|
|
|
|
- <view class="label"><text>*</text>新配件名称</view>
|
|
|
|
- <view class="picker">
|
|
|
|
- <text class="value" v-if="item">{{ item.name }}</text>
|
|
|
|
- <text class="placeholder" v-else>选择产品</text>
|
|
|
|
- <text class="iconfont icon-jinru"></text>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <view class="item">
|
|
|
|
- <view class="label"><text>*</text>新配件编号</view>
|
|
|
|
- <u--input
|
|
|
|
- :readonly="hasOid"
|
|
|
|
- placeholder="请输入"
|
|
|
|
- border="none"
|
|
|
|
- inputAlign="right"
|
|
|
|
- v-model="orderNo"
|
|
|
|
- ></u--input>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
- <u-gap height="10" bgColor="#F7F8FF"></u-gap>
|
|
|
|
- <u-button class="btnloukong" text="添加配件" @click="addpeijian"></u-button>
|
|
|
|
- <u-gap height="10" bgColor="#F7F8FF"></u-gap>
|
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<template slot="footer">
|
|
<template slot="footer">
|
|
@@ -94,7 +57,7 @@
|
|
text="历史记录"
|
|
text="历史记录"
|
|
@click="$navToPage({ url: `/packageMaterial/pages/sale/orderList?type=${type}` })"
|
|
@click="$navToPage({ url: `/packageMaterial/pages/sale/orderList?type=${type}` })"
|
|
></u-button>
|
|
></u-button>
|
|
- <u-button type="primary" text="提交" @click="submitData"></u-button>
|
|
|
|
|
|
+ <u-button type="primary" text="选择产品" @click="toChooseProduct"></u-button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -162,6 +125,7 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
|
|
wbId: null, // 维保工单
|
|
wbId: null, // 维保工单
|
|
wbIsAllFee: null, // 维保工单是否包含全部费用
|
|
wbIsAllFee: null, // 维保工单是否包含全部费用
|
|
wbPayType: null, // 维保工单费用支付方式
|
|
wbPayType: null, // 维保工单费用支付方式
|
|
|
|
+
|
|
type: 'M',
|
|
type: 'M',
|
|
userMobile: '',
|
|
userMobile: '',
|
|
orderNo: '',
|
|
orderNo: '',
|
|
@@ -175,7 +139,6 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
|
|
websit: null,
|
|
websit: null,
|
|
websitList: [],
|
|
websitList: [],
|
|
isShowWebsitDialog: false,
|
|
isShowWebsitDialog: false,
|
|
- peijianList:[]
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -212,25 +175,9 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
|
|
this.wbPayType = data.feePayMethod || '';
|
|
this.wbPayType = data.feePayMethod || '';
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- },
|
|
|
|
-
|
|
|
|
- onShow() {
|
|
|
|
- var data = this.$getStorage('materialSaleData')
|
|
|
|
- if (data.dijiIndex !== undefined && this.peijianList[data.dijiIndex]) {
|
|
|
|
- console.log(data)
|
|
|
|
- }
|
|
|
|
- this.$removeStorage('materialSaleData')
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- methods: {
|
|
|
|
- addpeijian() {
|
|
|
|
- this.peijianList.push({})
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- delpeijian(index) {
|
|
|
|
- this.peijianList.splice(index, 1)
|
|
|
|
- },
|
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
+ methods: {
|
|
getBrandList() {
|
|
getBrandList() {
|
|
this.$api.post('/pay/getBrand')
|
|
this.$api.post('/pay/getBrand')
|
|
.then(res => {
|
|
.then(res => {
|
|
@@ -267,40 +214,21 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
|
|
this.isShowWebsitDialog = false;
|
|
this.isShowWebsitDialog = false;
|
|
},
|
|
},
|
|
|
|
|
|
- toChooseProduct(index) {
|
|
|
|
- if(this.type == 'P' && !this.category) return this.$toast('请选择产品大类');
|
|
|
|
- if(!this.websit) return this.$toast('请选择所属网点');
|
|
|
|
- if(!this.userMobile) return this.$toast('请输入客户电话');
|
|
|
|
- if(!(/^1[3456789]\d{9}$/.test(this.userMobile)) || this.userMobile.length != 11) return this.$toast('请填写正确的客户电话');
|
|
|
|
- this.$navToPage({
|
|
|
|
- url: `/packageMaterial/pages/sale/product?dijiIndex=${index}&type=${this.type}&categoryId=${this.type=='P'?this.category.categoryId:''}&categoryName=${this.type=='P'?this.category.name:''}&userMobile=${this.userMobile}&orderNo=${this.orderNo}&websitId=${this.websit.websitId}&websitName=${this.websit.name}&wbId=${this.wbId||''}&wbIsAllFee=${this.wbIsAllFee||''}&wbPayType=${this.wbPayType||''}`
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- submitData() {
|
|
|
|
- if(this.peijianList.length < 1) return this.$toast('请选择');
|
|
|
|
- this.$setStorage('materialSaleDataZhiFu', {
|
|
|
|
- type: this.type,
|
|
|
|
- categoryId: this.type == 'P' ? this.category.categoryId : '',
|
|
|
|
- categoryName: this.type == 'P' ? this.category.name : '',
|
|
|
|
- salesType: 'OUT',
|
|
|
|
- brandId: null,
|
|
|
|
- brandName: null,
|
|
|
|
- websitId: this.websit.websitId,
|
|
|
|
- websitName: this.websit.websitName,
|
|
|
|
- userMobile: this.userMobile,
|
|
|
|
- orderNo: this.orderNo,
|
|
|
|
- wbId: this.wbId,
|
|
|
|
- wbIsAllFee: this.wbIsAllFee,
|
|
|
|
- wbPayType: this.wbPayType,
|
|
|
|
- goodsList: this.peijianList
|
|
|
|
- });
|
|
|
|
- this.$navToPage({
|
|
|
|
- url: `/packageMaterial/pages/sale/order`
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
-}
|
|
|
|
|
|
+ toChooseProduct() {
|
|
|
|
+ // if(!this.brand) return this.$toast('请选择品牌');
|
|
|
|
+ if(this.type == 'P' && !this.category) return this.$toast('请选择产品大类');
|
|
|
|
+ if(!this.websit) return this.$toast('请选择所属网点');
|
|
|
|
+ if(!this.userMobile) return this.$toast('请输入客户电话');
|
|
|
|
+ if(!(/^1[3456789]\d{9}$/.test(this.userMobile)) || this.userMobile.length != 11) return this.$toast('请填写正确的客户电话');
|
|
|
|
+ // this.$navToPage({
|
|
|
|
+ // url: `/packageMaterial/pages/sale/product?type=${this.type}&brandId=${this.brand.id}&brandName=${this.brand.brandName}&categoryId=${this.type=='P'?this.category.categoryId:''}&categoryName=${this.type=='P'?this.category.name:''}&salesType=${this.salesType}&userMobile=${this.userMobile}&orderNo=${this.orderNo}&websitId=${this.websit.websitId}&websitName=${this.websit.name}&wbId=${this.wbId||''}&wbIsAllFee=${this.wbIsAllFee||''}&wbPayType=${this.wbPayType||''}`
|
|
|
|
+ // })
|
|
|
|
+ this.$navToPage({
|
|
|
|
+ url: `/packageMaterial/pages/sale/product?type=${this.type}&categoryId=${this.type=='P'?this.category.categoryId:''}&categoryName=${this.type=='P'?this.category.name:''}&userMobile=${this.userMobile}&orderNo=${this.orderNo}&websitId=${this.websit.websitId}&websitName=${this.websit.name}&wbId=${this.wbId||''}&wbIsAllFee=${this.wbIsAllFee||''}&wbPayType=${this.wbPayType||''}`
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ }
|
|
|
|
|
|
// #endif
|
|
// #endif
|
|
// #ifndef H5
|
|
// #ifndef H5
|
|
@@ -322,15 +250,6 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
|
|
background: #ffffff;
|
|
background: #ffffff;
|
|
margin-top: 20rpx;
|
|
margin-top: 20rpx;
|
|
border-top: 1px solid #f5f5f5;
|
|
border-top: 1px solid #f5f5f5;
|
|
- .btnloukong {
|
|
|
|
- height: 72rpx;
|
|
|
|
- border: 2rpx solid #005ef4;
|
|
|
|
- margin: 0;
|
|
|
|
- background: transparent;
|
|
|
|
- font-size: 28rpx;
|
|
|
|
- line-height: 72rpx;
|
|
|
|
- color: #0268fa;
|
|
|
|
- }
|
|
|
|
.item {
|
|
.item {
|
|
height: 108rpx;
|
|
height: 108rpx;
|
|
border-bottom: 1px solid #f5f5f5;
|
|
border-bottom: 1px solid #f5f5f5;
|