Commit 0bf7a62a authored by 张海景's avatar 张海景

update:修改选择打印模板

parent 5cce97f6
......@@ -156,9 +156,9 @@ const install = (Vue, vm) => {
params
),
//人员绑定打印机
getUserPrint:(params = {}) =>
getUserPrint: (params = {}) =>
vm.$u.get(config.adminPath + '/system/printerConfig/userList', params),
addUserPrint:(params = {}) =>
addUserPrint: (params = {}) =>
vm.$u.postJson(config.adminPath + '/system/print', params),
//投料验证
......@@ -257,7 +257,10 @@ const install = (Vue, vm) => {
vm.$u.get(config.adminPath + '/mes/pro/workorder/list', params),
//查看生产工单
getWorkorderWithSizeAndDirective: (params = {}) =>
vm.$u.get(config.adminPath + '/mes/pro/workorder/listWithSizeAndDirective', params),
vm.$u.get(
config.adminPath + '/mes/pro/workorder/listWithSizeAndDirective',
params
),
logout: (params = {}) =>
vm.$u.get(config.adminPath + '/mobile/login/logout', params),
......@@ -282,7 +285,8 @@ const install = (Vue, vm) => {
vm.$u.post('/account/getRegValidCode', params),
saveRegByValidCode: (params = {}) =>
vm.$u.post('/account/saveRegByValidCode', params),
getPrintTemplateList: (params = {}) =>
vm.$u.get(config.adminPath + '/ureportM/list' , params),
// APP公共服务
upgradeCheck: () =>
vm.$u.post('/app/upgrade/check', {
......
<template>
<view class="dmodel-table">
<zb-table ref="zbTable" rowKey="id"
:columns="tableColumn" :data="tableData" :stripe="true"
@toggleRowSelection="toggleRowSelection">
<template slot="slot" slot-scope="scope">
<dict-tag
:options="dict.type.sys_report_type"
:value="scope.row.reportType"
/>
</template>
</zb-table>
</view>
</template>
<script>
export default {
dicts: ["sys_report_type"],
props: {
data: {
type: Object,
default: () => {}
}
},
data() {
return {
tableData: [],
tableSelectData: [],
tableColumn: [{
type: 'radio',
width: 80
},
{
name: 'name',
label: '模版名称',
width: 160,
},
{
type: 'slot',
name: 'reportType',
label: '模版类型',
width: 200,
},
{
name: 'remark',
label: '备注',
width: 100,
}
],
}
},
// computed: {
// tableData() {
// return this.data || []
// }
// },
mounted() {
this.getList()
// this.data.workstationName
},
methods: {
async getList() {
let params = {
pageNum: 1,
pageSize: 10000,
reportType: 'package_label'
}
const res = await this.$u.api.getPrintTemplateList(params)
console.log(res, 'res')
if (res.code == 200) {
this.tableData=res.rows.map(item => {
return {
...item,
workstationName: this.data.workstationName
}
})
}
},
toggleRowSelection(checked, arr) {
console.log(arr, 'arrs')
this.tableSelectData = arr
},
}
}
</script>
<style scoped>
.dmodel-table {
height: 500rpx;
margin-top: 20rpx;
padding: 0 20rpx;
}
.search{
display: flex;
margin-bottom:20rpx;
align-items: center;
.u-search{
width: 400rpx !important;
margin-right:20rpx !important;
}
}
</style>
......@@ -106,7 +106,7 @@
<!--查看图片查询的生产工单-->
<u-modal
title="生产报工"
@confirm="feedback()"
@confirm="handleSubmitfeedback"
show-cancel-button
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="open"
......@@ -206,11 +206,31 @@
<u-number-box :min="0" :positive-integer="false" :input-width="190" v-model="feedback.netWeight"></u-number-box>
</u-form-item>
</u-col>
<u-col span="6">
<u-form-item label="打印模板" prop="printTemplate">
<u-input v-model="feedback.printTemplate" disabled placeholder="请选择打印模板"></u-input>
<u-button
@tap="getPrintTemplate(feedback)"
type="success"
size="mini"
>选择打印模板</u-button>
</u-form-item>
</u-col>
</u-row>
</view>
</u-form>
</view>
</u-modal>
<u-modal
title="选择打印模板"
@confirm="handleSubmitPrintTemplate"
show-cancel-button
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="printTemplateVisible"
width="1300rpx"
>
<print-template ref="printTemplateRef" :data="printTemplateData" />
</u-modal>
<u-modal
title="刀模版上下机"
......@@ -630,6 +650,7 @@
import SearchInput from '@/components/ScanInput/index.vue';
import dModelList from './components/dModelList.vue';
import userPersonnel from './components/userPersonnel.vue';
import printTemplate from './components/printTemplate.vue';
import UButton from '../../../uview-ui/components/u-button/u-button.vue';
import { handleError } from "vue";
export default {
......@@ -638,6 +659,7 @@ export default {
SearchInput,
dModelList,
userPersonnel,
printTemplate,
UButton
},
data() {
......@@ -948,9 +970,9 @@ export default {
applyNum: null,
workorderCode: null
},
userTempVisible: false,
printTemplateData: null,
printTemplateVisible: false,
userTempVisible: false,
materialReturnFormVisible: false,
materialReturnSelected: {},
tableDetailColumn: [
......@@ -1504,6 +1526,14 @@ userTempVisible: false,
quantityChanged() {
this.feedbackForm.quantity = this.feedbackForm.quantityQualify + this.feedbackForm.quantityUnqualify;
},
getPrintTemplate(row) {
this.printTemplateData = row
this.printTemplateVisible = true
},
handleSubmitPrintTemplate() {
this.printTemplateData.printTemplate = this.$refs.printTemplateRef.tableSelectData[0].name
this.printTemplateVisible = false
},
doFeedback() {
// this.reset();
this.feedbackForms = [];
......@@ -1519,7 +1549,7 @@ userTempVisible: false,
taskWorkunitId: item.taskWorkunitId,
feedbackChannel: 'PAD',
quantity: item.quantity,
quantityQualify: defQualify,//默认为排产数量-合格数-不合格数
quantityQualify: Number(defQualify),//默认为排产数量-合格数-不合格数
quantityUnqualify: 0,
printName: '',
lastProcess: item.isLastProcess==1,//未工序
......@@ -1528,7 +1558,7 @@ userTempVisible: false,
workorderCode: null,
workorderSoDirectiveId: '',
workorderSoSizeItemId: '',
netWeight: '',
netWeight: 0,
workorderList: [],
workorderOption: [],
directiveList:[],
......@@ -1537,6 +1567,7 @@ userTempVisible: false,
sizeData: {},
printContents: item.arrangeCode,
whether: '',
printTemplate: ''
};
this.getWorkorderWithSizeAndDirective(feedback);
this.feedbackForms.push(feedback);
......@@ -1575,7 +1606,7 @@ userTempVisible: false,
cancel() {
this.open = false;
},
feedback() {
handleSubmitfeedback() {
this.open = true;
this.feedbackForms.forEach((item) => {
if (item.quantityQualify === 0 && item.quantityUnqualify === 0) {
......
......@@ -79,6 +79,7 @@
:style=" `height: calc(100% - ${showSummary?80:40}px)`">
<view class="zb-table-fixed">
<view class="zb-table-tbody">
<radio-group @change="handleRadio">
<view :class="['item-tr',highlight&&isHighlight(item,index)?'current-row':'', isTrClassStyle&&isTrClassStyle(item,index)? 'trbg': '']"
@click.stop="rowClick(item,index)"
v-for="(item,index) in transData" :key="item.key">
......@@ -124,6 +125,11 @@
:checked="item.checked"/>
</view>
</template>
<template v-else-if="ite.type==='radio'">
<view class="checkbox-item">
<radio :value="item[rowKey]+ ''"/>
</view>
</template>
<template v-else-if="ite.type==='index'">
{{ index + 1 }}
</template>
......@@ -158,6 +164,7 @@
</template>
</view>
</view>
</radio-group>
</view>
</view>
</scroll-view>
......@@ -843,6 +850,12 @@ export default {
this.$emit('toggleRowSelection', true, this.selectArr)
}
},
handleRadio(event) {
const items = this.data.find(v => v[this.rowKey] == event.target.value)
this.selectArr = []
this.selectArr[0] = items
this.$emit('toggleRowSelection', true, this.selectArr)
},
rowClick(row, index) {
this.isDisable = true
setTimeout(() => {
......
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