shish 2 vuotta sitten
vanhempi
commit
1b1645da2c

+ 2 - 0
ghs/src/cool/request/index.js

@@ -49,12 +49,14 @@ import checkOrder from '@/service/check-order/index';
 import ghsDebtRecord from '@/service/ghs-debt-record/index';
 import statCgGhs from '@/service/stat-cg-ghs/index';
 import shopYeChange from '@/service/shop-ye-change/index';
+import shopExt from '@/service/shop-ext/index';
 
 export function SET_SERVICE({ store }) {
 	// const files = require.context('@/service/', true, /\.js$/);
 	// const ignore = ['./request.js'];
 
 	let modules = {
+		shopExt,
 		shopYeChange,
 		statCgGhs,
 		ghsDebtRecord,

+ 13 - 0
ghs/src/service/shop-ext/index.js

@@ -0,0 +1,13 @@
+import { BaseService, Service } from '@/cool';
+@Service('shop-ext')
+export class ShopExtService extends BaseService {
+
+	getPrintFn(data) {
+		return this.request({
+			url: '/get-print',
+			params: data
+		});
+	}
+
+}
+export default new ShopExtService();

+ 1 - 0
ghs/src/views/in/add.vue

@@ -96,6 +96,7 @@ export default {
 			let query = {}
 			query.ghsId = info.id
 			query.ghsName = info.name
+			query.location = info.location||0
 			this.$router.push({path:'/in/confirm',query})
 		},
 		handleClick(tab, e) {

+ 47 - 3
ghs/src/views/in/confirm.vue

@@ -172,11 +172,29 @@
             <el-input placeholder="请填写打包费" @input="inputFn" v-model="form.packingCharge"></el-input>
           </div>    
         </div>
+
+        <div class="accounts-list" v-if="location == 1">
+          打印小票
+          <div class="accounts-center">
+            <el-button :type="form.needPrint == 1?'primary':''" @click="form.needPrint = 1" size="small">打印</el-button>
+            <el-button :type="form.needPrint == 2?'primary':''" @click="form.needPrint = 2" size="small">不打</el-button>
+          </div>
+        </div>
+
+        <div class="accounts-list" v-if="!$util.isEmpty(wcPrintList) && form.needPrint == 1">
+          选择机器
+          <div class="accounts-center">
+            <el-button :type="form.fistWcPrintNum == pItem.id ? 'primary' : ''" @click="form.fistWcPrintNum = pItem.id" size="small" v-for="(pItem, pIndex) in wcPrintList" :key="pIndex">
+              {{ pItem.name }}
+            </el-button>
+          </div>
+        </div>
+
         <div class="accounts-list">
           运费支付
           <div class="accounts-center">
-          <el-button :type="form.yfPayWay == 1?'primary':''" @keyup.enter.native="form.yfPayWay == 1" @click="changeYfPayWay(1)" size="small">寄付</el-button>
-            <el-button :type="form.yfPayWay == 2?'primary':''" @keyup.enter.native="form.yfPayWay == 2" @click="changeYfPayWay(2)" size="small">到付</el-button>
+          <el-button :type="form.yfPayWay == 1?'primary':''" @click="changeYfPayWay(1)" size="small">寄付</el-button>
+            <el-button :type="form.yfPayWay == 2?'primary':''" @click="changeYfPayWay(2)" size="small">到付</el-button>
           </div>
         </div>
         <div class="accounts-list">
@@ -275,7 +293,7 @@ export default {
 				fistWcPrintNum:1,
 				cgStaffId:0,
 				cgStaffName:'',
-				isCost:1
+				isCost:1,
 			},
 			detailsInfo: {},
 			totalFreight:0,
@@ -314,6 +332,8 @@ export default {
 			selectJobType: "purchase",
       globalCheckStock:false,
       cgUnitType:0,//采购入库使用单位
+      wcPrintList:[],
+      location:0
     };
   },
 	mixins: [productMins],
@@ -404,6 +424,12 @@ export default {
       this.beginSelect(id,name)
     }
 
+    this.location = this.$route.query.location ? this.$route.query.location : 0
+    if(this.location == 1){
+      //如果是本地默认需要打印
+			this.form.needPrint = 1
+		}
+
     if(this.form.ghsId == 0){
       this.$nextTick(() => {
         this.$refs.ghsRef.focus()
@@ -484,6 +510,24 @@ export default {
       this.classList = data
     })
 
+    //打印机数量
+    this.$service.shopExt.getPrintFn().then(data => {
+      if(data.wcPrintNum && Number(data.wcPrintNum)>1){
+        if(Number(data.wcPrintNum)==2){
+          that.wcPrintList = [{name:"机1",id:1},{name:"机2",id:2}]
+        }
+        if(Number(data.wcPrintNum) ==3){
+          that.wcPrintList = [{name:"机1",id:1},{name:"机2",id:2},{name:"机3",id:3}]
+        }
+        if(Number(data.wcPrintNum) ==4){
+          that.wcPrintList = [{name:"机1",id:1},{name:"机2",id:2},{name:"机3",id:3},{name:"机4",id:4}]
+        }
+        if(Number(data.wcPrintNum) ==5){
+          that.wcPrintList = [{name:"机1",id:1},{name:"机2",id:2},{name:"机3",id:3},{name:"机4",id:4},{name:"机5",id:5}]
+        }
+      }
+    })
+
   },
   methods: {
     getGhsBlur(){

+ 0 - 12
ghsApp/src/pagesOrder/arrival.vue

@@ -55,18 +55,6 @@
 						<view class="tui-title">商品金额</view>
 						<view class="detail-price_box" style="font-size: 28upx;">¥{{itemPrice}}</view>
 					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title">运费</view>
-						<view class="detail-price_box" style="font-size: 28upx;">
-							<input style="border:1upx solid #eee;color:#3385FF;width:150upx;height:70upx;float:right;text-align:center;" type="digit" v-model="sendCost" placeholder-class="tui-placeholder"/>
-						</view>
-					</tui-list-cell>
-					<tui-list-cell class="line-cell" :hover="false">
-						<view class="tui-title">打包费</view>
-						<view class="detail-price_box" style="font-size: 28upx;">
-							<input style="border:1upx solid #eee;color:#3385FF;width:150upx;height:70upx;float:right;text-align:center;" type="digit" v-model="packCost" placeholder-class="tui-placeholder"/>
-						</view>
-					</tui-list-cell>
 					<tui-list-cell class="line-cell" :hover="false">
 						<view class="tui-title">总计</view>
 						<view class="detail-price_box red" style="font-size: 28upx;">¥{{allPrice}}</view>

+ 6 - 0
ghsApp/src/pagesPurchase/details.vue

@@ -283,6 +283,12 @@ export default {
 						if(Number(res.data.wcPrintNum) ==3){
 							that.wcPrintList = [{name:"机1",id:1},{name:"机2",id:2},{name:"机3",id:3}]
 						}
+						if(Number(res.data.wcPrintNum) ==4){
+							that.wcPrintList = [{name:"机1",id:1},{name:"机2",id:2},{name:"机3",id:3},{name:"机4",id:4}]
+						}
+						if(Number(res.data.wcPrintNum) ==5){
+							that.wcPrintList = [{name:"机1",id:1},{name:"机2",id:2},{name:"机3",id:3},{name:"机4",id:4},{name:"机5",id:5}]
+						}
 					}
 				}
 			})