|
@@ -2,15 +2,6 @@
|
|
|
<!-- #ifdef H5 -->
|
|
|
<zj-page-layout :hasFooter="true">
|
|
|
<view class="form-container">
|
|
|
- <view class="item" v-if="type == 'P'" @tap="isShowCategoryDialog = true">
|
|
|
- <view class="label"><text>*</text>产品大类</view>
|
|
|
- <view class="picker">
|
|
|
- <text class="value" v-if="category">{{ category.name }}</text>
|
|
|
- <text class="placeholder" v-else>请选择</text>
|
|
|
- <text class="iconfont icon-jinru"></text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <u-gap height="10" bgColor="#F7F8FF"></u-gap>
|
|
|
<view class="item">
|
|
|
<view class="label"><text>*</text>客户电话</view>
|
|
|
<u--input :maxlength="11" placeholder="请输入" border="none" inputAlign="right" v-model="userMobile"></u--input>
|
|
@@ -105,32 +96,6 @@
|
|
|
</template>
|
|
|
|
|
|
<zjDialogPicker
|
|
|
- ref="brandDialog"
|
|
|
- :isShow="isShowBrandDialog"
|
|
|
- :multiple="false"
|
|
|
- :styleType="2"
|
|
|
- :title="'品牌'"
|
|
|
- :list="brandList"
|
|
|
- :keyName="'brandName'"
|
|
|
- @cancel="isShowBrandDialog = false"
|
|
|
- @confirm="confirmBrandDialog"
|
|
|
- >
|
|
|
- </zjDialogPicker>
|
|
|
-
|
|
|
- <zjDialogPicker
|
|
|
- ref="categoryDialog"
|
|
|
- :isShow="isShowCategoryDialog"
|
|
|
- :multiple="false"
|
|
|
- :styleType="2"
|
|
|
- :title="'产品大类'"
|
|
|
- :list="categoryList"
|
|
|
- :keyName="'name'"
|
|
|
- @cancel="isShowCategoryDialog = false"
|
|
|
- @confirm="confirmCategoryDialog"
|
|
|
- >
|
|
|
- </zjDialogPicker>
|
|
|
-
|
|
|
- <zjDialogPicker
|
|
|
ref="websitDialog"
|
|
|
:isShow="isShowWebsitDialog"
|
|
|
:multiple="false"
|
|
@@ -189,13 +154,9 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
|
|
|
this.type = type;
|
|
|
this.hasOid = oid.length > 0;
|
|
|
uni.setNavigationBarTitle({
|
|
|
- title: type == 'M' ? '辅材收款' : '配件收款'
|
|
|
+ title: '配件收款'
|
|
|
})
|
|
|
- this.getBrandList();
|
|
|
this.getWebsitList();
|
|
|
- if(type == 'P') {
|
|
|
- this.getCategoryList();
|
|
|
- }
|
|
|
if(this.hasOid) {
|
|
|
this.$api.post('/pg/order/base/detail', {
|
|
|
orderBaseId: oid,
|
|
@@ -255,20 +216,6 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
|
|
|
this.rpMaterialOrderItemList.splice(index, 1)
|
|
|
},
|
|
|
|
|
|
- getBrandList() {
|
|
|
- this.$api.post('/pay/getBrand')
|
|
|
- .then(res => {
|
|
|
- this.brandList = res.data;
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- getCategoryList() {
|
|
|
- this.$api.post('/pay/getCategoryList')
|
|
|
- .then(res => {
|
|
|
- this.categoryList = res.data;
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
getWebsitList() {
|
|
|
this.$api.get('/user/apply/websit')
|
|
|
.then(res => {
|
|
@@ -276,29 +223,17 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- confirmBrandDialog(e) {
|
|
|
- this.brand = this.brandList[e[0]];
|
|
|
- this.isShowBrandDialog = false;
|
|
|
- },
|
|
|
-
|
|
|
- confirmCategoryDialog(e) {
|
|
|
- this.category = this.categoryList[e[0]];
|
|
|
- this.isShowCategoryDialog = false;
|
|
|
- },
|
|
|
-
|
|
|
confirmWebsitDialog(e) {
|
|
|
this.websit = this.websitList[e[0]];
|
|
|
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('请填写正确的客户电话');
|
|
|
- console.log(this.websit)
|
|
|
this.$navToPage({
|
|
|
- url: `/packageMaterial/pages/newSale/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}&partsWebsitId=${this.websit.partsWebsitId}&websitId=${this.websit.websitId}&websitName=${this.websit.name}&wbId=${this.wbId||''}&wbIsAllFee=${this.wbIsAllFee||''}&wbPayType=${this.wbPayType||''}`
|
|
|
+ url: `/packageMaterial/pages/newSale/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}&partsWebsitId=${this.websit.partsWebsitId}&websitId=${this.websit.websitId}&websitName=${this.websit.name}&wbId=${this.wbId||''}&wbIsAllFee=${this.wbIsAllFee||''}&wbPayType=${this.wbPayType||''}`
|
|
|
})
|
|
|
},
|
|
|
|
|
@@ -306,8 +241,8 @@ import zjDialogPicker from "@/components/zj-dialog/zj-dialog-picker.vue";
|
|
|
if(this.rpMaterialOrderItemList.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 : '',
|
|
|
+ categoryId: this.type == 'P' ? this?.category?.categoryId : '',
|
|
|
+ categoryName: this.type == 'P' ? this?.category?.name : '',
|
|
|
salesType: 'OUT',
|
|
|
brandId: null,
|
|
|
brandName: null,
|