|
|
@@ -47,11 +47,8 @@
|
|
|
|
|
|
<tui-list-cell class="line-cell" :arrow="true">
|
|
|
<div class="tui-title">采购人</div>
|
|
|
- <picker mode="selector" :value="form.cgStaffId" :range="staffList" range-key="name" @change="cgManChange" class="tui-input" >
|
|
|
- <input v-model="form.cgStaffId" name="cgStaffId" type="text" hidden />
|
|
|
- <div style="padding:6upx 0 6upx 0;color:#ccc;" v-if="form.cgStaffName==''">请选择</div>
|
|
|
- <div style="padding:6upx 0 6upx 0;" v-else>{{form.cgStaffName}}</div>
|
|
|
- </picker>
|
|
|
+ <view @click="changeCgStaff()" style="width:240upx;">{{ form.cgStaffName==''?'请选择':form.cgStaffName }}</view>
|
|
|
+ <button @click="getMySelf()" class="admin-button-com middle blue" style="margin-left:20upx;">我自己</button>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
@@ -189,9 +186,22 @@ class="admin-button-com middle" :class="form.needPrint == 2? 'blue' : 'default'"
|
|
|
</text>
|
|
|
</view>
|
|
|
<button v-if="location == 0" class="admin-button-com blue big" @click="formSubmit(0)">下一步</button>
|
|
|
- <button v-else class="admin-button-com blue big" @click="formSubmit(1)">提交入库</button>
|
|
|
+ <button v-else class="admin-button-com blue big" @click="formSubmit(1)">确认提交</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <uni-popup ref="staffRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
+ <view style="max-height:90vh;overflow: scroll;">
|
|
|
+ <view style="margin-left:30upx;margin-top:19upx;font-size:27upx;font-weight:bold;">请选择:</view>
|
|
|
+ <view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
|
|
|
+ <view v-for="(item, index) in staffList" :key="index" @tap.stop="getCgStaff(item)" style="margin-bottom:20upx;margin-left:3upx;">
|
|
|
+ <view style="margin-top:8upx;overflow: hidden;white-space: nowrap;width:120upx;text-align:center;font-weight:bold;font-size:30upx;">{{item.name}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view style="text-align:center;padding:10upx 0 10upx 0;"><button class="admin-button-com big blue" @click="closeCgStaff()">关闭</button></view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -282,6 +292,7 @@ export default {
|
|
|
that.cgUnitType = res.data.shopInfo && res.data.shopInfo.cgUnitType ? res.data.shopInfo.cgUnitType : 0
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
},
|
|
|
onShow(){
|
|
|
if(!this.$util.isEmpty(uni.getStorageSync("newGhs"))){
|
|
|
@@ -366,6 +377,23 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getCgStaff(staff){
|
|
|
+ this.$refs.staffRef.close()
|
|
|
+ this.form.cgStaffName = staff.name
|
|
|
+ this.form.cgStaffId = staff.id
|
|
|
+ },
|
|
|
+ closeCgStaff(){
|
|
|
+ this.$refs.staffRef.close()
|
|
|
+ },
|
|
|
+ changeCgStaff(){
|
|
|
+ this.$refs.staffRef.open('center')
|
|
|
+ },
|
|
|
+ getMySelf(){
|
|
|
+ let staffId = this.getLoginInfo && this.getLoginInfo.staff.id ? this.getLoginInfo.staff.id : 0
|
|
|
+ let staffName = this.getLoginInfo && this.getLoginInfo.staff.name ? this.getLoginInfo.staff.name:''
|
|
|
+ this.form.cgStaffName = staffName
|
|
|
+ this.form.cgStaffId = staffId
|
|
|
+ },
|
|
|
bindEntryTimeChange(e){
|
|
|
let date = e.detail.value
|
|
|
this.form.entryTime = date
|
|
|
@@ -373,15 +401,6 @@ export default {
|
|
|
isCostChange(e){
|
|
|
this.form.isCost = e.detail.value
|
|
|
},
|
|
|
- cgManChange(e){
|
|
|
- let index = e.detail.value
|
|
|
- if(!this.$util.isEmpty(this.staffList)){
|
|
|
- if(this.staffList[index]){
|
|
|
- this.form.cgStaffName = this.staffList[index].name
|
|
|
- this.form.cgStaffId = this.staffList[index].id
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
changeYfPayWay(index){
|
|
|
this.form.yfPayWay = index
|
|
|
this.inputFn()
|
|
|
@@ -467,10 +486,7 @@ export default {
|
|
|
},
|
|
|
formSubmitFun(inType){
|
|
|
let that = this;
|
|
|
- let title = '确认入库?'
|
|
|
- if(inType == 0){
|
|
|
- title = '确认提交?'
|
|
|
- }
|
|
|
+ let title = '确认提交?'
|
|
|
that.$util.confirmModal({content:title},() => {
|
|
|
that.confirmFn(inType);
|
|
|
})
|
|
|
@@ -507,7 +523,7 @@ export default {
|
|
|
if(that.location == 0){
|
|
|
that.$util.pageTo({url: "/pagesPurchase/components/pageSuccess?orderSn="+res.data.orderSn+"&id="+res.data.id+"&status="+res.data.status,type:2})
|
|
|
}else{
|
|
|
- that.$msg('入库成功')
|
|
|
+ that.$msg('提交成功')
|
|
|
setTimeout(function(){
|
|
|
that.$util.pageTo({url: "/pagesPurchase/info?orderSn="+res.data.orderSn+'&refresh=1',type:2})
|
|
|
},900)
|