|
|
@@ -130,14 +130,14 @@
|
|
|
<view class="button-area">
|
|
|
<!-- <view :class="[orderInfo.status != 2 && orderInfo.stockLock==0 ? 'active' : '']" @click="lockFn(orderInfo)">锁定</view> -->
|
|
|
<view class="active" style="border:1upx solid #FF5722;color:#FF5722;" @tap="draw()">打样</view>
|
|
|
- <view :class="[orderInfo.status==0 ? 'active' : '']" @tap="finishFn(orderInfo)">完成</view>
|
|
|
+ <view :class="[orderInfo.status==0 ? 'active' : '']" @tap="beginFinishFn(orderInfo)">完成</view>
|
|
|
<view :class="[orderInfo.status==1 ? 'active' : '']" @click="printFn(orderInfo)">打印</view>
|
|
|
<view :class="[orderInfo.status==0 ? 'active' : '']" @click="cancelFn(orderInfo)">取消</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 完成制作单弹框 -->
|
|
|
<uni-popup ref="createWorkRef" background-color="#fff" type="right">
|
|
|
- <createWork @cancelCreate="cancelCreate()" @confirmCreate="confirmCreate()"></createWork>
|
|
|
+ <createWork @cancelCreate="cancelCreate()" @confirmCreate="confirmCreate()" :staffList.sync="staffList"></createWork>
|
|
|
</uni-popup>
|
|
|
|
|
|
<!-- 选数量金额 -->
|
|
|
@@ -158,6 +158,15 @@
|
|
|
<uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认完成?" @confirm="confirmFinish"></uni-popup-dialog>
|
|
|
</uni-popup>
|
|
|
|
|
|
+ <uni-popup ref="finishStaffRef" type="dialog">
|
|
|
+ <view style="background-color:white;width:60vw;padding:20upx 0 20upx 10upx;">
|
|
|
+ <view style="margin-bottom:20upx;text-align:center;">制作人</view>
|
|
|
+ <view class="staff-list">
|
|
|
+ <view v-for="staff in staffList" :class="[staffId===staff.id?'selected':'']" @click="setStaffFinish(staff,orderInfo)" :key="staff.id">{{staff.name}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -168,6 +177,7 @@ import wastageSelectNum from './wastageSelectNum.vue'
|
|
|
import { mapGetters } from "vuex";
|
|
|
import productMins from "@/mixins/product";
|
|
|
import createWork from './createWork.vue'
|
|
|
+import { getAllStaff } from '@/api/shop-admin'
|
|
|
export default {
|
|
|
name: "workInfo",
|
|
|
components: {wastageSelectNum,createWork},
|
|
|
@@ -182,7 +192,10 @@ export default {
|
|
|
currentJobType:'modify',
|
|
|
currentJobId:0,
|
|
|
beginCount:0,
|
|
|
- INT:null
|
|
|
+ INT:null,
|
|
|
+ staffList:[],
|
|
|
+ staffId:0,
|
|
|
+ staffName:''
|
|
|
}
|
|
|
},
|
|
|
props: {
|
|
|
@@ -207,7 +220,13 @@ export default {
|
|
|
mounted() {
|
|
|
// #ifdef APP-PLUS
|
|
|
this.listenScanItem()
|
|
|
- // #endif
|
|
|
+ // #endif
|
|
|
+ let that = this
|
|
|
+ getAllStaff().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.staffList = res.data.list?res.data.list:[]
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
destroyed(){
|
|
|
|
|
|
@@ -299,14 +318,25 @@ export default {
|
|
|
this.$util.hitVoice()
|
|
|
this.$refs.wastageSelectNumRef.close()
|
|
|
},
|
|
|
- finishFn(info){
|
|
|
+ beginFinishFn(){
|
|
|
+ this.$util.hitVoice()
|
|
|
+ this.$refs.finishStaffRef.open('center')
|
|
|
+ },
|
|
|
+ setStaffFinish(staff,info){
|
|
|
this.$util.hitVoice()
|
|
|
+ this.$refs.finishStaffRef.close()
|
|
|
+ this.staffId = staff.id
|
|
|
+ this.staffName = staff.name
|
|
|
if(info.status == 0){
|
|
|
this.$refs.finishRef.open('center')
|
|
|
}
|
|
|
},
|
|
|
confirmFinish(){
|
|
|
- let params = {id:this.orderInfo.id}
|
|
|
+ if(Number(this.staffId)<0){
|
|
|
+ this.$msg('请选择制作人')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ let params = {id:this.orderInfo.id,staffId:this.staffId,staffName:this.staffName}
|
|
|
if(!this.$util.isEmpty(this.selectList)){
|
|
|
const newItem = this.selectList.map(ele=>{
|
|
|
return {productId:ele.id,num:ele.currentNum,unitType:ele.unitType,unitPrice:ele.unitPrice}
|
|
|
@@ -405,6 +435,31 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+.staff-list{
|
|
|
+ background-color:white;
|
|
|
+ width:100%;
|
|
|
+ height:auto;
|
|
|
+ flex-wrap:wrap;
|
|
|
+ display:flex;
|
|
|
+ justify-content:space-around;
|
|
|
+ margin:5upx 0 5upx 0;
|
|
|
+ view{
|
|
|
+ width:40upx;
|
|
|
+ height:40upx;
|
|
|
+ font-size:10upx;
|
|
|
+ margin-left:3upx;
|
|
|
+ border:1upx solid #DDDDDD;
|
|
|
+ border-radius:10upx;
|
|
|
+ display: flex;
|
|
|
+ justify-content:center;
|
|
|
+ align-items:center;
|
|
|
+ }
|
|
|
+ .selected{
|
|
|
+ background-color:#3385ff;
|
|
|
+ color:white;
|
|
|
+ border:1upx solid #3385ff;
|
|
|
+ }
|
|
|
+}
|
|
|
.work-empty{
|
|
|
display:flex;
|
|
|
font-size:13upx;
|