shish 5 лет назад
Родитель
Сommit
b61477ceb6

+ 9 - 10
ghsApp/src/admin/billing/affirm.vue

@@ -48,16 +48,18 @@
         </view>
         <!-- 登录信息 -->
         <view class="module-com input-line-wrap">
-									<view class="tab-box flex-space">
-										<view class="flex-center tab" :class="isBilling?'active':''" @tap="isBilling=true">开单</view>
-										<view class="flex-center tab" :class="isBilling?'':'active'" @tap="isBilling=false">报损</view>
-									</view>
-									<view class="" v-if="isBilling">
-          <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="showCustomer = true">
+          <view class="tab-box flex-space">
+            <view class="flex-center tab" :class="isBilling?'active':''" @tap="isBilling=true">开单</view>
+            <view class="flex-center tab" :class="isBilling?'':'active'" @tap="isBilling=false">报损</view>
+          </view>
+
+					<view class="" v-if="isBilling">
+          <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="pageTo({ url: '/admin/custom/selectCustom',query: {style:2}})">
             <view class="tui-title">客户</view>
             <view class="tui-input" v-if="form.customId" >{{ form.customName }}</view>
             <view class="tui-placeholder" style="width: 100%" v-else >请选择客户</view>
           </tui-list-cell>
+
           <tui-list-cell class="line-cell" :hover="false" :arrow="false">
             <view class="tui-title">送货</view>
             <button @tap="courier(2)" class="admin-button-com mini-btn" :class="form.sendType == 2 ? 'blue' : 'default'">
@@ -136,8 +138,7 @@
         开单
       </button>
     </view>
-    <!-- 选择客户 -->
-    <AppCustomerSel :show.sync="showCustomer" @change="changeCustomerFn"/>
+
   </view>
 </template>
 
@@ -146,7 +147,6 @@ import TuiListCell from "@/components/plugin/list-cell";
 import AppAvatarModule from "@/components/module/app-avatar";
 import SimpleAddress from "@/components/plugin/simple-address";
 import AppAreaSel from "@/components/app-area-sel";
-import AppCustomerSel from "@/components/app-customer-sel";
 import productMins from "@/mixins/product";
 import appFormRadioBtn from "@/components/app-formRadio-btn";
 import appAddressGroup from "@/components/app-address-group";
@@ -162,7 +162,6 @@ export default {
     AppAvatarModule,
     SimpleAddress,
     AppAreaSel,
-    AppCustomerSel,
     appFormRadioBtn,
     appAddressGroup,
     appSendTime,

+ 16 - 1
ghsApp/src/admin/order/selectCustom.vue → ghsApp/src/admin/custom/selectCustom.vue

@@ -7,7 +7,7 @@
     </view>
     <block v-if="!$util.isEmpty(list.data)">
       <block v-for="(item, index) in list.data" :key="index">
-        <tui-list-cell :arrow="true" @click=" pageTo({url: '/admin/billing/index',type:2,query: {customId: item.id,customName:item.name}})">
+        <tui-list-cell :arrow="true" @click="selectCurrent(item)">
           <div class="tui-msg-box">
             <img :src="item.avatar" class="tui-msg-pic" mode="widthFix" />
             <div class="tui-msg-item">
@@ -82,6 +82,21 @@ export default {
 		uni.removeStorageSync('newClient');
 	},
   methods: {
+    selectCurrent(item){
+       
+      let style = this.option.style ? this.option.style : 1
+      if(style == 1){
+        //点开单选客户后再选花材
+        this.$util.pageTo({url: '/admin/billing/index',type:2,query: {customId: item.id,customName:item.name}})
+      }else if(style == 2){
+        //已经选完花材后重选客户
+        let pages = getCurrentPages();
+        let prevPage = pages[ pages.length - 2 ];
+        prevPage.$vm.form.customId = item.id;
+        prevPage.$vm.form.customName = item.name;
+        uni.navigateBack({})
+      }
+    },
     init() {
       if(!this.AUTHORITY_SHOW) {
         this._list();

+ 1 - 1
ghsApp/src/admin/home/workbench.vue

@@ -67,7 +67,7 @@
 		<view class="module-com">
 			<view class="tabs-head_bx">
 				<image
-					@click="pageTo({ url: '/admin/order/selectCustom' })"
+					@click="pageTo({ url: '/admin/custom/selectCustom',query: {style:1}})"
 					:src="kdSrc"
 					mode="widthFix"
 				></image>

+ 1 - 1
ghsApp/src/pages.json

@@ -21,7 +21,7 @@
 			]
 		},
 		{
-			"root": "admin/order",
+			"root": "admin/custom",
 			"pages": [
 				{"path": "selectCustom","style": {"navigationBarTitleText": "选择客户"}}
 			]