rev 更新工单和打印机驱动
This commit is contained in:
@@ -84,17 +84,50 @@
|
||||
<el-form-item label="计划数量" prop="planned_quantity">
|
||||
<el-input v-model="form.planned_quantity" style="width: 370px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="瓶身号" prop="bottle_number">
|
||||
<el-form-item label="瓶盖号" prop="bottle_number">
|
||||
<el-input v-model="form.bottle_number" style="width: 370px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="纸箱号" prop="carton_number">
|
||||
<el-input v-model="form.carton_number" style="width: 370px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="瓶身关联标签模板" prop="bottle_board">
|
||||
<el-input v-model="form.bottle_board" style="width: 370px;" @change="isDisabled=false" />
|
||||
<el-form-item label="晶科每罐重量kg(选填)" prop="bottle_weight">
|
||||
<el-input v-model="form.bottle_weight" style="width: 370px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="瓶盖关联标签模板" prop="bottle_board">
|
||||
<el-select
|
||||
v-model="form.bottle_board"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in templateList"
|
||||
:key="item.template_name"
|
||||
:label="item.template_name"
|
||||
:value="item.template_name"
|
||||
>
|
||||
<span style="float: left">{{ item.template_name }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.bottle_board }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="纸箱关联标签模板" prop="carton_board">
|
||||
<el-input v-model="form.carton_board" style="width: 370px;" @change="isDisabled=false" />
|
||||
<el-select
|
||||
v-model="form.carton_board"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 370px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in templateList1"
|
||||
:key="item.template_name"
|
||||
:label="item.template_name"
|
||||
:value="item.template_name"
|
||||
>
|
||||
<span style="float: left">{{ item.template_name }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.carton_board }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="纸箱装瓶数量" prop="carton_qty">
|
||||
<el-input v-model="form.carton_qty" style="width: 370px;" @change="isDisabled=false" />
|
||||
@@ -137,13 +170,13 @@
|
||||
<el-form-item label="计划数量" prop="planned_quantity">
|
||||
<el-input v-model="form.planned_quantity" style="width: 370px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="瓶身号" prop="bottle_number">
|
||||
<el-form-item label="瓶盖号" prop="bottle_number">
|
||||
<el-input v-model="form.bottle_number" style="width: 370px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="纸箱号" prop="carton_number">
|
||||
<el-input v-model="form.carton_number" style="width: 370px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="瓶身关联标签模板" prop="bottle_board">
|
||||
<el-form-item label="瓶盖关联标签模板" prop="bottle_board">
|
||||
<el-input v-model="form.bottle_board" style="width: 370px;" @change="isDisabled=false" />
|
||||
</el-form-item>
|
||||
<el-form-item label="纸箱关联标签模板" prop="carton_board">
|
||||
@@ -175,9 +208,9 @@
|
||||
<el-table-column prop="production_materials" label="实发型号" :min-width="flexWidth('production_materials',crud.data,'实发型号')" />
|
||||
<el-table-column prop="large_model" label="大型号" :min-width="flexWidth('large_model',crud.data,'大型号')" />
|
||||
<el-table-column prop="small_model" label="小型号" :min-width="flexWidth('small_model',crud.data,'小型号')" />
|
||||
<el-table-column prop="bottle_number" label="瓶身号" :min-width="flexWidth('bottle_number',crud.data,'瓶身号')" />
|
||||
<el-table-column prop="bottle_number" label="瓶盖号" :min-width="flexWidth('bottle_number',crud.data,'瓶盖号')" />
|
||||
<el-table-column prop="carton_number" label="纸箱号" :min-width="flexWidth('carton_number',crud.data,'纸箱号')" />
|
||||
<el-table-column prop="bottle_board" label="瓶身关联标签模板" :min-width="flexWidth('bottle_board',crud.data,'瓶身关联标签模板')" />
|
||||
<el-table-column prop="bottle_board" label="瓶盖关联标签模板" :min-width="flexWidth('bottle_board',crud.data,'瓶盖关联标签模板')" />
|
||||
<el-table-column prop="carton_board" label="纸箱关联标签模板" :min-width="flexWidth('carton_board',crud.data,'纸箱关联标签模板')" />
|
||||
<el-table-column prop="carton_qty" label="纸箱装瓶数量" :min-width="flexWidth('carton_qty',crud.data,'纸箱装瓶数量')" />
|
||||
<el-table-column prop="ticket_status" label="状态" width="80px">
|
||||
@@ -235,6 +268,7 @@ import deviceCrud from '@/api/acs/device/device'
|
||||
import routeCurd from '@/api/acs/route/routePlan'
|
||||
import { getDicts } from '@/views/system/dict/dict'
|
||||
import MaterialDialog from '@/views/acs/order/MaterialDialog.vue'
|
||||
import template from '@/api/acs/order/template'
|
||||
export default {
|
||||
name: 'Tickets',
|
||||
components: { MaterialDialog,pagination, crudOperation, rrOperation },
|
||||
@@ -261,6 +295,7 @@ export default {
|
||||
materialList: [],
|
||||
statusList: [],
|
||||
routeList: [],
|
||||
|
||||
flag: 1,
|
||||
materialDialog: false,
|
||||
fullscreenLoading: false,
|
||||
@@ -276,6 +311,8 @@ export default {
|
||||
toYList: [],
|
||||
toZList: [],
|
||||
operate: [],
|
||||
templateList: [],
|
||||
templateList1: [],
|
||||
start_flag: false,
|
||||
end_flag: false,
|
||||
permission: {
|
||||
@@ -291,11 +328,14 @@ export default {
|
||||
form: {
|
||||
ticket_id: null,
|
||||
batch_number: null,
|
||||
bottle_weight: null,
|
||||
device_code: null,
|
||||
production_orders: null,
|
||||
production_materials: null,
|
||||
planned_quantity: null,
|
||||
bottle_number: null,
|
||||
templateList: [],
|
||||
templateList1: [],
|
||||
carton_number: null,
|
||||
carton_form: null,
|
||||
carton_qty: null,
|
||||
@@ -312,6 +352,7 @@ export default {
|
||||
form1: {
|
||||
ticket_id: null,
|
||||
batch_number: null,
|
||||
bottle_weight: null,
|
||||
device_code: null,
|
||||
production_orders: null,
|
||||
production_materials: null,
|
||||
@@ -382,6 +423,12 @@ export default {
|
||||
deviceCrud.selectDeviceList().then(data => {
|
||||
this.deviceList = data
|
||||
})
|
||||
template.getTemplateList().then(data => {
|
||||
this.templateList = data
|
||||
})
|
||||
template.getTemplateList1().then(data => {
|
||||
this.templateList1 = data
|
||||
})
|
||||
routeCurd.selectList().then(data => {
|
||||
this.routeList = data
|
||||
})
|
||||
@@ -403,6 +450,17 @@ export default {
|
||||
updateIsIce1() {
|
||||
this.form1.weight_ok = this.concatenatedValue1
|
||||
},
|
||||
// getTemplateList() {
|
||||
// console.log("111");
|
||||
// template.getTemplateList().then(data => {
|
||||
// this.templateList = data
|
||||
// })
|
||||
// },
|
||||
// getTemplateList1() {
|
||||
// template.getTemplateList1().then(data => {
|
||||
// this.templateList1 = data
|
||||
// })
|
||||
// },
|
||||
getMaterial(flag) {
|
||||
this.materialDialog = true
|
||||
this.flag = flag
|
||||
@@ -431,9 +489,10 @@ export default {
|
||||
this.form.production_materials=row.production_materials
|
||||
this.form.large_model=row.large_model
|
||||
this.form.small_model=row.small_model
|
||||
this.form.planned_quantity=row.weight
|
||||
this.form.planned_quantity=row.sum_qty
|
||||
this.form.bottle_number=row.bottle_number
|
||||
this.form.carton_number=row.carton_number
|
||||
this.form.carton_qty=row.carton_qty
|
||||
}
|
||||
},
|
||||
handleDateTimeChange() {
|
||||
@@ -513,6 +572,7 @@ export default {
|
||||
ticket_id: null,
|
||||
device_code: null,
|
||||
batch_number: null,
|
||||
bottle_weight: null,
|
||||
production_orders: null,
|
||||
production_materials: null,
|
||||
planned_quantity: null,
|
||||
@@ -527,6 +587,8 @@ export default {
|
||||
customer: null,
|
||||
is_ice: null,
|
||||
is_labeling: null,
|
||||
templateList: [],
|
||||
templateList1: [],
|
||||
weight_ok: null,
|
||||
ticket_status: null
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
v-model="templateId"
|
||||
filterable
|
||||
placeholder="请选择瓶盖模板"
|
||||
style="width: 150px;"
|
||||
style="width: 250px;"
|
||||
@change="getTemplateById"
|
||||
>
|
||||
<el-option
|
||||
@@ -50,11 +50,11 @@
|
||||
/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="templateId"
|
||||
v-model="templateId1"
|
||||
filterable
|
||||
placeholder="请选择纸箱模板"
|
||||
style="width: 150px;"
|
||||
@change="getTemplateById"
|
||||
style="width: 250px;"
|
||||
@change="getTemplateById1"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in templateList1"
|
||||
@@ -286,6 +286,7 @@ export default {
|
||||
templateList1: [],
|
||||
ticketId: null,
|
||||
templateId: null,
|
||||
templateId1: null,
|
||||
templateLoading: false,
|
||||
curPaper: {
|
||||
type: 'A4',
|
||||
@@ -366,7 +367,7 @@ export default {
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
const wsUri = window.g.prod.VUE_APP_BASE_API.replace('http', 'ws') + '/webSocket/sendPrint/' + uuidv1()
|
||||
const wsUri = window.g.dev.VUE_APP_BASE_API.replace('http', 'ws') + '/webSocket/sendPrint/' + uuidv1()
|
||||
this.websock = new WebSocket(wsUri)
|
||||
this.websock.onmessage = this.webSocketOnMessage
|
||||
},
|
||||
@@ -460,6 +461,17 @@ if (typeValue === 2){
|
||||
})
|
||||
// }
|
||||
},
|
||||
getTemplateById1() {
|
||||
// if (hiprintTemplate) {
|
||||
template.see(this.templateId1).then(res => {
|
||||
try {
|
||||
this.hiprintTemplate.update(JSON.parse(res.template))
|
||||
} catch (e) {
|
||||
this.$message.error(`更新失败: ${e}`)
|
||||
}
|
||||
})
|
||||
// }
|
||||
},
|
||||
|
||||
otherPaper() {
|
||||
this.hiprintTemplate.setPaper(this.paperWidth, this.paperHeight)
|
||||
|
||||
Reference in New Issue
Block a user