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

update:修改选择打印模板

parent 5cce97f6
...@@ -156,9 +156,9 @@ const install = (Vue, vm) => { ...@@ -156,9 +156,9 @@ const install = (Vue, vm) => {
params params
), ),
//人员绑定打印机 //人员绑定打印机
getUserPrint:(params = {}) => getUserPrint: (params = {}) =>
vm.$u.get(config.adminPath + '/system/printerConfig/userList', params), vm.$u.get(config.adminPath + '/system/printerConfig/userList', params),
addUserPrint:(params = {}) => addUserPrint: (params = {}) =>
vm.$u.postJson(config.adminPath + '/system/print', params), vm.$u.postJson(config.adminPath + '/system/print', params),
//投料验证 //投料验证
...@@ -257,7 +257,10 @@ const install = (Vue, vm) => { ...@@ -257,7 +257,10 @@ const install = (Vue, vm) => {
vm.$u.get(config.adminPath + '/mes/pro/workorder/list', params), vm.$u.get(config.adminPath + '/mes/pro/workorder/list', params),
//查看生产工单 //查看生产工单
getWorkorderWithSizeAndDirective: (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 = {}) => logout: (params = {}) =>
vm.$u.get(config.adminPath + '/mobile/login/logout', params), vm.$u.get(config.adminPath + '/mobile/login/logout', params),
...@@ -282,7 +285,8 @@ const install = (Vue, vm) => { ...@@ -282,7 +285,8 @@ const install = (Vue, vm) => {
vm.$u.post('/account/getRegValidCode', params), vm.$u.post('/account/getRegValidCode', params),
saveRegByValidCode: (params = {}) => saveRegByValidCode: (params = {}) =>
vm.$u.post('/account/saveRegByValidCode', params), vm.$u.post('/account/saveRegByValidCode', params),
getPrintTemplateList: (params = {}) =>
vm.$u.get(config.adminPath + '/ureportM/list' , params),
// APP公共服务 // APP公共服务
upgradeCheck: () => upgradeCheck: () =>
vm.$u.post('/app/upgrade/check', { 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 @@ ...@@ -106,7 +106,7 @@
<!--查看图片查询的生产工单--> <!--查看图片查询的生产工单-->
<u-modal <u-modal
title="生产报工" title="生产报工"
@confirm="feedback()" @confirm="handleSubmitfeedback"
show-cancel-button show-cancel-button
:title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }" :title-style="{ 'background-color': '#1E3770', color: '#FFFFFF', 'line-height': '37px', 'padding-top': '0px' }"
v-model="open" v-model="open"
...@@ -206,11 +206,31 @@ ...@@ -206,11 +206,31 @@
<u-number-box :min="0" :positive-integer="false" :input-width="190" v-model="feedback.netWeight"></u-number-box> <u-number-box :min="0" :positive-integer="false" :input-width="190" v-model="feedback.netWeight"></u-number-box>
</u-form-item> </u-form-item>
</u-col> </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> </u-row>
</view> </view>
</u-form> </u-form>
</view> </view>
</u-modal> </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 <u-modal
title="刀模版上下机" title="刀模版上下机"
...@@ -630,6 +650,7 @@ ...@@ -630,6 +650,7 @@
import SearchInput from '@/components/ScanInput/index.vue'; import SearchInput from '@/components/ScanInput/index.vue';
import dModelList from './components/dModelList.vue'; import dModelList from './components/dModelList.vue';
import userPersonnel from './components/userPersonnel.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 UButton from '../../../uview-ui/components/u-button/u-button.vue';
import { handleError } from "vue"; import { handleError } from "vue";
export default { export default {
...@@ -638,6 +659,7 @@ export default { ...@@ -638,6 +659,7 @@ export default {
SearchInput, SearchInput,
dModelList, dModelList,
userPersonnel, userPersonnel,
printTemplate,
UButton UButton
}, },
data() { data() {
...@@ -948,9 +970,9 @@ export default { ...@@ -948,9 +970,9 @@ export default {
applyNum: null, applyNum: null,
workorderCode: null workorderCode: null
}, },
printTemplateData: null,
printTemplateVisible: false,
userTempVisible: false, userTempVisible: false,
materialReturnFormVisible: false, materialReturnFormVisible: false,
materialReturnSelected: {}, materialReturnSelected: {},
tableDetailColumn: [ tableDetailColumn: [
...@@ -1504,6 +1526,14 @@ userTempVisible: false, ...@@ -1504,6 +1526,14 @@ userTempVisible: false,
quantityChanged() { quantityChanged() {
this.feedbackForm.quantity = this.feedbackForm.quantityQualify + this.feedbackForm.quantityUnqualify; 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() { doFeedback() {
// this.reset(); // this.reset();
this.feedbackForms = []; this.feedbackForms = [];
...@@ -1519,7 +1549,7 @@ userTempVisible: false, ...@@ -1519,7 +1549,7 @@ userTempVisible: false,
taskWorkunitId: item.taskWorkunitId, taskWorkunitId: item.taskWorkunitId,
feedbackChannel: 'PAD', feedbackChannel: 'PAD',
quantity: item.quantity, quantity: item.quantity,
quantityQualify: defQualify,//默认为排产数量-合格数-不合格数 quantityQualify: Number(defQualify),//默认为排产数量-合格数-不合格数
quantityUnqualify: 0, quantityUnqualify: 0,
printName: '', printName: '',
lastProcess: item.isLastProcess==1,//未工序 lastProcess: item.isLastProcess==1,//未工序
...@@ -1528,7 +1558,7 @@ userTempVisible: false, ...@@ -1528,7 +1558,7 @@ userTempVisible: false,
workorderCode: null, workorderCode: null,
workorderSoDirectiveId: '', workorderSoDirectiveId: '',
workorderSoSizeItemId: '', workorderSoSizeItemId: '',
netWeight: '', netWeight: 0,
workorderList: [], workorderList: [],
workorderOption: [], workorderOption: [],
directiveList:[], directiveList:[],
...@@ -1537,6 +1567,7 @@ userTempVisible: false, ...@@ -1537,6 +1567,7 @@ userTempVisible: false,
sizeData: {}, sizeData: {},
printContents: item.arrangeCode, printContents: item.arrangeCode,
whether: '', whether: '',
printTemplate: ''
}; };
this.getWorkorderWithSizeAndDirective(feedback); this.getWorkorderWithSizeAndDirective(feedback);
this.feedbackForms.push(feedback); this.feedbackForms.push(feedback);
...@@ -1575,7 +1606,7 @@ userTempVisible: false, ...@@ -1575,7 +1606,7 @@ userTempVisible: false,
cancel() { cancel() {
this.open = false; this.open = false;
}, },
feedback() { handleSubmitfeedback() {
this.open = true; this.open = true;
this.feedbackForms.forEach((item) => { this.feedbackForms.forEach((item) => {
if (item.quantityQualify === 0 && item.quantityUnqualify === 0) { if (item.quantityQualify === 0 && item.quantityUnqualify === 0) {
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
:style=" `height: calc(100% - ${showSummary?80:40}px)`"> :style=" `height: calc(100% - ${showSummary?80:40}px)`">
<view class="zb-table-fixed"> <view class="zb-table-fixed">
<view class="zb-table-tbody"> <view class="zb-table-tbody">
<radio-group @change="handleRadio">
<view :class="['item-tr',highlight&&isHighlight(item,index)?'current-row':'', isTrClassStyle&&isTrClassStyle(item,index)? 'trbg': '']" <view :class="['item-tr',highlight&&isHighlight(item,index)?'current-row':'', isTrClassStyle&&isTrClassStyle(item,index)? 'trbg': '']"
@click.stop="rowClick(item,index)" @click.stop="rowClick(item,index)"
v-for="(item,index) in transData" :key="item.key"> v-for="(item,index) in transData" :key="item.key">
...@@ -124,6 +125,11 @@ ...@@ -124,6 +125,11 @@
:checked="item.checked"/> :checked="item.checked"/>
</view> </view>
</template> </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'"> <template v-else-if="ite.type==='index'">
{{ index + 1 }} {{ index + 1 }}
</template> </template>
...@@ -158,6 +164,7 @@ ...@@ -158,6 +164,7 @@
</template> </template>
</view> </view>
</view> </view>
</radio-group>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
...@@ -843,6 +850,12 @@ export default { ...@@ -843,6 +850,12 @@ export default {
this.$emit('toggleRowSelection', true, this.selectArr) 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) { rowClick(row, index) {
this.isDisable = true this.isDisable = true
setTimeout(() => { 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