Commit dd1ea6f0 authored by chenzj's avatar chenzj

修复

parent 9db3f6af
...@@ -151,7 +151,13 @@ const install = (Vue, vm) => { ...@@ -151,7 +151,13 @@ const install = (Vue, vm) => {
config.adminPath + '/mobile/pro/taskissue/getReserveIssueList', config.adminPath + '/mobile/pro/taskissue/getReserveIssueList',
params params
), ),
//打印流转单
//人员绑定打印机
getUserPrint:(params = {}) =>
vm.$u.get(config.adminPath + '/system/printerConfig/list', params),
addUserPrint:(params = {}) =>
vm.$u.postJson(config.adminPath + '/system/print', params),
//投料验证 //投料验证
listFeedingInspection: (params = {}) => listFeedingInspection: (params = {}) =>
......
...@@ -37,16 +37,67 @@ ...@@ -37,16 +37,67 @@
</view> </view>
</u-modal> </u-modal>
<u-modal v-model="showLogoutMenu" :showConfirmButton=false :showCancelButton="true" width="400px"
<u-modal v-model="showLogoutMenu" :showConfirmButton=false :showCancelButton="true" width="600px"
title="请选择操作"> title="请选择操作">
<view class="logoutmenu"> <view class="logoutmenu">
<u-button shape="circle" class="menu_button" @click="" type="primary">更改密码</u-button> <u-button shape="circle" class="menu_button" @click="" type="primary">更改密码</u-button>
<u-button shape="circle" class="menu_button" @click="handleCommand('workunit')" type="warning">切换工作站 <u-button shape="circle" class="menu_button" @click="handleCommand('workunit')" type="warning">切换工作站
</u-button> </u-button>
<u-button shape="circle" class="menu_button" @click="handleCommand('print')" type="error">默认打印机</u-button>
<u-button shape="circle" class="menu_button" @click="handleCommand('exit')" type="error">退出登录</u-button> <u-button shape="circle" class="menu_button" @click="handleCommand('exit')" type="error">退出登录</u-button>
</view> </view>
</u-modal> </u-modal>
<!-- <u-modal
title="领料申请"
@confirm="materialRequestSave()"
show-cancel-button
:title-style="{
'background-color': '#1E3770',
color: '#FFFFFF',
'line-height': '37px',
'padding-top': '0px' }"
v-model=""
width="1300rpx"
> -->
<u-modal
title="生产工单"
show-cancel-button
:show-confirm-button="false"
cancel-text="返回"
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="showPrintFlag"
width="1300rpx"
>
<view class="list-bar">
<u-form label-width="100px" :model="curTaskInfo">
</u-form>
<scroll-view scroll-y="true" class="scroll-list" :style="{ height: this.screenHeight - 280 + 'px' }">
<uni-table ref="materialRequestTable" border stripe :loading="loading" emptyText="未查询到数据">
<uni-tr>
<uni-th width="150px" align="center">打印机名称</uni-th>
<uni-th width="20px" align="center">操作</uni-th>
</uni-tr>
<uni-tr v-for="(line, index) in materialRequestArrays" :key="index">
<uni-td align="center">{{ line.printerName }}</uni-td>
<uni-td align="center">
<view class="uni-group">
<button class="uni-button" size="mini" type="primary" @click="materialRequestFormShow(line)">绑定</button>
</view>
</uni-td>
</uni-tr>
</uni-table>
</scroll-view>
</view>
</u-modal>
</view> </view>
</template> </template>
<script> <script>
...@@ -70,17 +121,23 @@ ...@@ -70,17 +121,23 @@
}, },
data() { data() {
return { return {
tabIndex: "PRO", tabIndex: "PRO",
showWorkstationFlag: false, showWorkstationFlag: false,
showPrintFlag: false,
showLogoutMenu: false, showLogoutMenu: false,
activeProcess: null, activeProcess: null,
loading: false,
userInfo: { userInfo: {
nickName: '张三', nickName: '张三',
avatar: require("@/static/images/head.png"), avatar: require("@/static/images/head.png"),
}, },
materialRequestArrays: [],
processList: [], //工序清单 processList: [], //工序清单
workstationList: [], //工作站清单 workstationList: [], //工作站清单
workUnitList:[],//工作站清单 workUnitList:[],//工作站清单
curTaskInfo: {},//打印机的
screenHeight: 768,
currentFlag: 0 currentFlag: 0
} }
}, },
...@@ -162,6 +219,35 @@ ...@@ -162,6 +219,35 @@
this.showWorkstationFlag = false; this.showWorkstationFlag = false;
uni.$emit('switchWorkunit', station); uni.$emit('switchWorkunit', station);
}, },
materialRequestFormShow(row){
this.$u.api.addUserPrint({
userId: this.vuex_user.userId,
userName: this.vuex_user.userName,
nickName: this.vuex_user.nickName,
printerId: row.printerId,
printerName: row.printerName,
printerIp: row.printerIp,
printerPort: row.printerPort,
printerType: row.printerType,
printerPlace: row.printerPlace,
printerModel: row.printerModel,
printerUrl: row.printerUrl,
printerStatus: row.status,
brand: row.brand,
connectionType: row.connectionType,
enableFlag: row.enableFlag,
}).then((res) => {
if (res.code === 200) {
if (res.msg === '操作成功') {
this.$u.toast('绑定成功');
this.getPrint();
} else {
this.$u.toast(res.msg);
}
}
});
},
handleCommand(command) { handleCommand(command) {
if (command === 'exit') { if (command === 'exit') {
this.loading = true; this.loading = true;
...@@ -183,10 +269,21 @@ ...@@ -183,10 +269,21 @@
} else if (command == 'workunit') { } else if (command == 'workunit') {
this.showLogoutMenu = false; this.showLogoutMenu = false;
this.showWorkstationFlag = true; this.showWorkstationFlag = true;
}else if(command == 'print'){
this.showPrintFlag =true;
this.getPrint();
} }
},
getPrint(){
this.$u.api.getUserPrint().then((res) => {
if(res.code==200){
this.materialRequestArrays=res.rows
} }
});
} }
},
} }
</script> </script>
<style> <style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment