|
|
@@ -151,6 +151,14 @@
|
|
|
<text v-if="modifyPrice > 0 && modifyPrice < finalPrice" style="font-size:25upx;margin-left:20upx;color:green;">优惠 ¥{{parseFloat((finalPrice-modifyPrice).toFixed(2))}}</text>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :arrow="true">
|
|
|
+ <div class="tui-title">开单人</div>
|
|
|
+ <picker mode="selector" :value="form.shopAdminId" :range="staffList" range-key="name" @change="kdChange" class="tui-input" >
|
|
|
+ <input v-model="form.shopAdminId" name="shopAdminId" type="text" hidden />
|
|
|
+ <div style="padding:6upx 0 6upx 0;">{{form.shopAdminName}}</div>
|
|
|
+ </picker>
|
|
|
+ </tui-list-cell>
|
|
|
+
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view class="tui-title">备注</view>
|
|
|
<textarea style="height: 100upx" v-model="form.remark" placeholder="选填" />
|
|
|
@@ -187,6 +195,7 @@ import appSendTime from "@/components/app-send-time";
|
|
|
import appFormSend from "@/components/app-form-send";
|
|
|
const formUtil = require("@/utils/formValidation.js");
|
|
|
import { createOrder, updateOrder } from "@/api/order/index";
|
|
|
+import { getAllStaff } from "@/api/shop-admin"
|
|
|
import { mapActions, mapGetters } from "vuex";
|
|
|
import { getUserDet} from "@/api/member";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
@@ -211,6 +220,7 @@ export default {
|
|
|
return {
|
|
|
autoLoad: false,
|
|
|
isBilling: true,
|
|
|
+ staffList:[],
|
|
|
payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
|
|
|
payWayindex:0,
|
|
|
form: {
|
|
|
@@ -232,7 +242,8 @@ export default {
|
|
|
remark:"",
|
|
|
payWay:0,
|
|
|
needPrint:1,//订单生成时打印订单1需要2不需要
|
|
|
- hasPay:0
|
|
|
+ hasPay:0,
|
|
|
+ shopAdminName:''
|
|
|
},
|
|
|
showCustomer: false,
|
|
|
customInfo:{discount:1},
|
|
|
@@ -261,7 +272,7 @@ export default {
|
|
|
} else {
|
|
|
uni.setNavigationBarTitle({ title: this.getMerchantInfo.name, })
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//默认自取
|
|
|
this.setSendType(2);
|
|
|
|
|
|
@@ -291,6 +302,22 @@ export default {
|
|
|
if(!this.$util.isEmpty(uni.getStorageSync("newClient"))){
|
|
|
this.showCustomer = true;
|
|
|
}
|
|
|
+
|
|
|
+ //获取所有在职员工
|
|
|
+ getAllStaff().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.staffList = res.data.list
|
|
|
+ if(!this.$util.isEmpty(this.staffList)){
|
|
|
+ for(const ele of this.staffList){
|
|
|
+ if(this.getLoginInfo.shopAdminId == ele.id){
|
|
|
+ this.form.shopAdminId = ele.id
|
|
|
+ this.form.shopAdminName = ele.name
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
onUnload(){
|
|
|
uni.removeStorageSync('newClient');
|
|
|
@@ -389,6 +416,15 @@ export default {
|
|
|
},
|
|
|
init () {
|
|
|
this._getDet();
|
|
|
+ },
|
|
|
+ kdChange(e){
|
|
|
+ let index = e.detail.value
|
|
|
+ if(!this.$util.isEmpty(this.staffList)){
|
|
|
+ if(this.staffList[index]){
|
|
|
+ this.form.shopAdminName = this.staffList[index].name
|
|
|
+ this.form.shopAdminId = this.staffList[index].id
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
payWayChange(e){
|
|
|
let index = e.detail.value
|