|
|
@@ -1,242 +1,182 @@
|
|
|
<template>
|
|
|
<el-container>
|
|
|
<el-main>
|
|
|
- <form method="POST" action="{:U('NewBarCodeNew/add_bach')}" style="margin-bottom:50px;" id="form">
|
|
|
- <input name="userid" id="userid" value="{$session_config[uid]}" type="hidden">
|
|
|
- <!-- <eq name="session_config.addtype" value="1">
|
|
|
- <fieldset class="newlabel">
|
|
|
- <legend style="width:auto;margin-left:20px;">生成厂商信息</legend>
|
|
|
- <ul class="firm">
|
|
|
- <li>
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- <span>生产厂商:</span>
|
|
|
- <input id="company_code" type="hidden" name="supplier_code" value="{$userinfo[printer_code]}" readonly style="background:#EBEBE4" >
|
|
|
- <input id="supplier_id" type="hidden" name="supplier_id" value="{$userinfo[id]}">
|
|
|
- <input id="company_name" type="text" name="supplier_name" value="{$userinfo[nickname]}" readonly style="background:#EBEBE4" >
|
|
|
- <!–<input name="company_name" readonly="readonly" id="company_name" value="浙江美浓世纪集团有限公司">–>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>编码:</span><input name="barcode_large" type="text" id="postcode" value="{$userinfo[barcode_large]}" readonly style="background:#EBEBE4">
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>代码:</span><input name="barcode_small" type="text" id="phone" value="{$userinfo[barcode_small]}" readonly style="background:#EBEBE4">
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- 地    址:<input class="company_addres" name="company_addres" type="text" id="company_address" value="{$userinfo[company_address]}" readonly style="background:#EBEBE4" >
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </fieldset>
|
|
|
- <else/>
|
|
|
- <fieldset class="newlabel">
|
|
|
- <legend style="width:auto;margin-left:20px;">生成厂商信息</legend>
|
|
|
- <ul class="firm">
|
|
|
- <li>
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- <span>生产厂商:</span>
|
|
|
- <select name="supplier_id" id="company_name1" style="width:200px;height:35px;">
|
|
|
- <volist name="companylist" id="vo">
|
|
|
- <option value="{$vo.id}">{$vo.nickname}</option>
|
|
|
- </volist>
|
|
|
- </select>
|
|
|
- <input id="company_code" type="hidden" name="supplier_code" value="{$companylist[0][printer_code]}" readonly style="background:#EBEBE4">
|
|
|
- <input id="company_id" type="hidden" name="supplier_id" value="{$companylist[0][id]}">
|
|
|
- <input id="company_name" type="hidden" name="supplier_name" value="{$companylist[0][nickname]}" readonly style="background:#EBEBE4">
|
|
|
- <!–<input name="company_name" readonly="readonly" id="company_name" value="浙江美浓世纪集团有限公司">–>
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>编码:</span><input name="barcode_large" type="text" id="barcode_large" value="{$companylist[0][barcode_large]}" readonly style="background:#EBEBE4">
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>代码:</span><input name="barcode_small" type="text" id="barcode_small" value="{$companylist[0][barcode_small]}" readonly style="background:#EBEBE4">
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- 地    址:<input class="company_addres" name="company_addres" type="text" id="company_address" value="{$companylist[0][company_address]}" readonly style="background:#EBEBE4">
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </fieldset>
|
|
|
- </eq>-->
|
|
|
- <!-- <fieldset class="newlabel">
|
|
|
- <legend style="width:auto;margin-left:20px;">辅料信息</legend>
|
|
|
- <ul class="product">
|
|
|
- <li>
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- <span>材料名称:</span>
|
|
|
- <select name="matter_id" id="product_name1" style="width:200px;height:35px;">
|
|
|
- <option value="0">============选择=============</option>
|
|
|
- <volist name="productlist" id="val" >
|
|
|
- <option value="{$val.id}" >{$val.title}</option>
|
|
|
- </volist>
|
|
|
- </select>
|
|
|
- <input name=" " type="hidden" readonly="readonly" id="product_num" value="{$productlist[0][product_num]}">
|
|
|
- <input id="matter_type" type="hidden" name="matter_type" value="{$productlist[0][box_type]}">
|
|
|
- <input id="product_name" type="hidden" name="matter_name" value="{$productlist[0][title]}">
|
|
|
- </li>
|
|
|
-
|
|
|
- <li>
|
|
|
- <span>产品规格:</span><input name="matter_size" readonly="readonly" id="product_size" value="" style="background:#EBEBE4">
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- <span>产品编码:</span>
|
|
|
- <input id="product_code" type="text" name="matter_no" value="" readonly style="background:#EBEBE4">
|
|
|
- <!–<span>产品编号:</span>–>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <ul>
|
|
|
- <li>
|
|
|
- 产品编号: <input name="code1" type="text" id="code1" readonly value="" style="background:#EBEBE4">
|
|
|
- </li>
|
|
|
- <li>
|
|
|
- 存货编码: <input name="inventory_code" type="text" id="inventory_code" readonly value="" style="background:#EBEBE4">
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </fieldset>-->
|
|
|
- <fieldset class="newlabel">
|
|
|
- <legend style="width:auto;margin-left:20px;">标记参数</legend>
|
|
|
- <!-- <button class="submitbtn" id="copy_bach" onclick="return false;" style="margin-left: 0;">复制批次信息</button>-->
|
|
|
- <table width="100%" border="1">
|
|
|
- <caption>标签序列配置</caption>
|
|
|
- <tr>
|
|
|
- <th style="width:40%;"><span>字段</span> </th>
|
|
|
- <th><span>值</span></th>
|
|
|
- </tr>
|
|
|
- <tr >
|
|
|
- <td><span>生产批次号</span></td>
|
|
|
- <td><input name="Gd_gdbh" type="text" id="Gd_gdbh" value="" class="required" style="width: 380px;height: 30px;"></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td><span>纸张名称</span></td>
|
|
|
- <td>
|
|
|
- <select name="maobao" id="maobao" style="width: 380px;height: 30px;">
|
|
|
-
|
|
|
- </select>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr >
|
|
|
- <td><span style="color: red">码包</span></td>
|
|
|
- <td><input name="mabao" type="text" id="mabao" value="" class="" style="width: 380px;height: 30px;" placeholder="利群(新版)专用,不是利群(新版)不要填"></td>
|
|
|
- </tr>
|
|
|
- <tr style="display: none" class="peijian">
|
|
|
- <td><span style="color: red">配件名称</span></td>
|
|
|
- <td>
|
|
|
- <select name="peijian" id="peijian" style="width: 380px;height: 30px; color: red" >
|
|
|
-
|
|
|
- </select>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td><span>单个流程包含的件数</span></td>
|
|
|
- <td><input name="tldx" type="text" id="tldx" value="3000" class="required" style="width: 380px;height: 30px;"></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td><span>总投纸数</span></td>
|
|
|
- <td>
|
|
|
- <input name="num" id="num" value="" style="width: 380px;height: 30px;">
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td><span>总流程</span></td>
|
|
|
- <td><input name="liucheng_total" type="number" id="liucheng_total" value="" class="required" style="width: 380px;height: 30px;"></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td><span>版本号标识</span></td>
|
|
|
- <td><input name="version" type="text" id="version" value="" class="required" style="width: 380px;height: 30px;"></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td><span>起始流程号</span></td>
|
|
|
- <td><input name="start_liucheng" type="text" id="start_liucheng" value="1" class="required" style="width: 380px;height: 30px;"></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td><span>本次打印流程数量</span></td>
|
|
|
- <td><input name="liucheng_num" type="text" id="liucheng_num" value="1" class="required" style="width: 380px;height: 30px;"></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>
|
|
|
- <span>备注</span></td>
|
|
|
- <td>
|
|
|
- <input name="remark" type="text" id="remark" style="width: 380px;height: 30px;"></td>
|
|
|
- </tr>
|
|
|
- <!-- <tr>-->
|
|
|
- <!-- <td><span style="color: red">工艺所属部门</span></td>-->
|
|
|
- <!-- <td>-->
|
|
|
- <!-- <select name="department" id="department" style="width: 380px;height: 30px;" >-->
|
|
|
- <!-- <option value="1">胶印车间</option>-->
|
|
|
- <!-- <option value="2">凹印车间</option>-->
|
|
|
- <!-- <option value="3">模切车间</option>-->
|
|
|
- <!-- </select>-->
|
|
|
- <!-- </td>-->
|
|
|
- <!-- </tr>-->
|
|
|
- <tr>
|
|
|
- <td>
|
|
|
- <span>左右偏移量</span></td>
|
|
|
- <td>
|
|
|
- <input name="x_offset" type="number" id="x_offset" value="0" style="width: 380px;height: 30px;"></td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td>
|
|
|
- <span>上下偏移量</span></td>
|
|
|
- <td>
|
|
|
- <input name="y_offset" type="number" id="y_offset" value="0" style="width: 380px;height: 30px;"></td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- </fieldset>
|
|
|
- <div id="daima">
|
|
|
- <table width="100%" border="1">
|
|
|
- <caption>产品代号</caption>
|
|
|
- <tr>
|
|
|
- <th style="width:40%;"><span>字段</span> </th>
|
|
|
- <th><span>值</span></th>
|
|
|
- </tr>
|
|
|
- <tr >
|
|
|
- <td><span>产品名称</span></td>
|
|
|
- <td>
|
|
|
- <select name="productname" id="product_name" style="width: 380px;height: 30px;">
|
|
|
-
|
|
|
- </select>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td><span>产品代号</span></td>
|
|
|
- <td>
|
|
|
- <textarea name="product_number" id="product_number" rows="10" cols="51" >
|
|
|
-
|
|
|
- </textarea>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
- <button type='button' style="margin-top: 10px;" class="submitbtn" id="numbtn">提交</button>
|
|
|
- </div>
|
|
|
- <div id="liucheng">
|
|
|
- <fieldset class="newlabel">
|
|
|
- <caption>工艺</caption>
|
|
|
- <table width="100%" border="1" class="new_craft" id="new_craft">
|
|
|
-
|
|
|
-
|
|
|
- </table>
|
|
|
- </fieldset>
|
|
|
- </div>
|
|
|
- <div style="position:fixed;bottom:0;width:100%;height:50px;line-height:50px;">
|
|
|
- <button type='button' onsubmit='return false' class="submitbtn" id="send">打印</button>
|
|
|
- </div>
|
|
|
- </form>
|
|
|
+ <form method="POST" :model="workData" action="{:U('NewBarCodeNew/add_bach')}" style="margin-bottom:50px;" id="form">
|
|
|
+ <input name="userid" id="userid" value="{$session_config[uid]}" type="hidden">
|
|
|
+ <fieldset class="newlabel">
|
|
|
+ <legend style="width:auto;margin-left:20px;">标记参数</legend>
|
|
|
+ <table width="100%" border="1">
|
|
|
+ <caption>标签序列配置</caption>
|
|
|
+ <tr>
|
|
|
+ <th style="width:40%;"><span>字段</span> </th>
|
|
|
+ <th><span>值</span></th>
|
|
|
+ </tr>
|
|
|
+ <tr >
|
|
|
+ <td><span>生产批次号</span></td>
|
|
|
+ <td><input name="Gd_gdbh" type="text" v-model="workData.Gd_gdbh" @input="propertyChange" class="required" style="width: 380px;height: 30px;"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td><span>纸张名称</span></td>
|
|
|
+ <td>
|
|
|
+ <select name="maobao" v-model="workData.maobao" style="width: 380px;height: 30px;">
|
|
|
+
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr >
|
|
|
+ <td><span style="color: red">码包</span></td>
|
|
|
+ <td><input name="mabao" type="text" v-model="workData.mabao" style="width: 380px;height: 30px;" placeholder="利群(新版)专用,不是利群(新版)不要填"></td>
|
|
|
+ </tr>
|
|
|
+ <tr style="display: none" class="peijian">
|
|
|
+ <td><span style="color: red">配件名称</span></td>
|
|
|
+ <td>
|
|
|
+ <select name="peijian" v-model="workData.peijian" style="width: 380px;height: 30px; color: red" >
|
|
|
+
|
|
|
+ </select>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td><span>单个流程包含的件数</span></td>
|
|
|
+ <td><input name="tldx" type="text" v-model="workData.tldx" value="3000" class="required" style="width: 380px;height: 30px;"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td><span>总投纸数</span></td>
|
|
|
+ <td>
|
|
|
+ <input name="num" v-model="workData.num" value="" style="width: 380px;height: 30px;">
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td><span>总流程</span></td>
|
|
|
+ <td><input name="liucheng_total" type="number" v-model="workData.liucheng_total" value="" class="required" style="width: 380px;height: 30px;"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td><span>版本号标识</span></td>
|
|
|
+ <td><input name="version" type="text" v-model="workData.version" class="required" style="width: 380px;height: 30px;"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td><span>起始流程号</span></td>
|
|
|
+ <td><input name="start_liucheng" type="text" v-model="workData.start_liucheng" value="1" class="required" style="width: 380px;height: 30px;"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td><span>本次打印流程数量</span></td>
|
|
|
+ <td><input name="liucheng_num" type="text" v-model="workData.liucheng_num" value="1" class="required" style="width: 380px;height: 30px;"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <span>备注</span></td>
|
|
|
+ <td>
|
|
|
+ <input name="remark" type="text" v-model="workData.remark" style="width: 380px;height: 30px;"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <span>左右偏移量</span></td>
|
|
|
+ <td>
|
|
|
+ <input name="x_offset" type="number" v-model="workData.x_offset" value="0" style="width: 380px;height: 30px;"></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>
|
|
|
+ <span>上下偏移量</span></td>
|
|
|
+ <td>
|
|
|
+ <input name="y_offset" type="number" v-model="workData.y_offset" value="0" style="width: 380px;height: 30px;"></td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </fieldset>
|
|
|
+ <div id="liucheng">
|
|
|
+ <fieldset class="newlabel">
|
|
|
+ <table width="100%" border="1" class="new_craft" id="new_craft">
|
|
|
+ <caption>工艺</caption>
|
|
|
+ <tr>
|
|
|
+ <td>上次<span style="color: red">{{department}}</span>工艺更新时间:<span style="color: red">{{update}}</span></td>
|
|
|
+ <td>
|
|
|
+ <input type="button" style="margin-left: 1px;" value="增加工艺" @click="addInput"/>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="(item,index) in gyData">
|
|
|
+ <td></td>
|
|
|
+ <td><input type="text" v-model="item.gy"></td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </fieldset>
|
|
|
+ </div>
|
|
|
+ <div style="position:fixed;bottom:0;width:100%;height:50px;line-height:50px;">
|
|
|
+ <button type='button' onsubmit='return false' class="submitbtn" @click="sendClick" id="send">打印</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
</template>
|
|
|
|
|
|
-<script>
|
|
|
-
|
|
|
+<script setup>
|
|
|
+ import {
|
|
|
+ getDocumentData,
|
|
|
+ getDocumentHistory,
|
|
|
+ saveDocumentData,
|
|
|
+ getDocumentInfo
|
|
|
+ } from '@/api/mes/job'
|
|
|
+ import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
|
|
|
+ import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
+ import { ref, reactive } from 'vue'
|
|
|
+ const workData = ref({
|
|
|
+ Gd_gdbh:'',
|
|
|
+ maobao:'',
|
|
|
+ mabao:'',
|
|
|
+ peijian:'',
|
|
|
+ tldx:'',
|
|
|
+ num:'',
|
|
|
+ liucheng_total:'',
|
|
|
+ version:'',
|
|
|
+ start_liucheng:'',
|
|
|
+ liucheng_num:'',
|
|
|
+ remark:'',
|
|
|
+ x_offset:'',
|
|
|
+ y_offset:''
|
|
|
+ })
|
|
|
+ const department = ref()
|
|
|
+ const update = ref()
|
|
|
+ const data = ref()
|
|
|
+ const gyData = ref([])
|
|
|
+ const datas = ref([])
|
|
|
+ const propertyChange = () => {
|
|
|
+ if(workData.value.Gd_gdbh.length!==7){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ const getDocument = async() => {
|
|
|
+ const getDocumentDatas = await getDocumentData({order:workData.value.Gd_gdbh})
|
|
|
+ if (getDocumentDatas.code === 0) {
|
|
|
+ workData.value.version=getDocumentDatas.data.paper[0].产品版本号;
|
|
|
+ const getHistory = async() => {
|
|
|
+ const getDocumentHistorys = await getDocumentHistory({order:2109722,peijian:0})
|
|
|
+ if (getDocumentHistorys.code === 0) {
|
|
|
+ department.value=getDocumentHistorys.data.department
|
|
|
+ update.value=getDocumentHistorys.data.update
|
|
|
+ gyData.value=getDocumentHistorys.data.data.map((item)=>({
|
|
|
+ gy:item
|
|
|
+ }))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ getHistory()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ getDocument()
|
|
|
+
|
|
|
+ }
|
|
|
+ const addInput = () => {
|
|
|
+ gyData.value.push({gy:''})
|
|
|
+ }
|
|
|
+ const sendClick = () => {
|
|
|
+ // console.log(datas)
|
|
|
+ // console.log(gyData.value)
|
|
|
+ const saveDocument = async() => {
|
|
|
+ datas.value = gyData.value.map((item)=>(item.gy))
|
|
|
+ data.value= datas.value.join(",")
|
|
|
+ // console.log(data.value)
|
|
|
+ const saveDocumentDatas = await saveDocumentData({order:2109722,data:data.value,peijian:0})
|
|
|
+ if (saveDocumentDatas.code === 0) {
|
|
|
+ console.log(saveDocumentDatas)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ saveDocument()
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style>
|