| | |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <ttable |
| | | :table="table" |
| | | :isShowHide="true" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | ref="processconfiguration" |
| | | > |
| | | <template #toolbar></template> |
| | | :table="table" |
| | | :isShowHide="true" |
| | | :prelang="prelang" |
| | | :ajaxFun="ajaxFun" |
| | | :options="options" |
| | | @handleSelectionChange="handleSelectionChange" |
| | | ref="processconfiguration" |
| | | > |
| | | <template #toolbar></template> |
| | | </ttable> |
| | | </el-col> |
| | | |
| | | |
| | | <el-col :span="13" style="padding-left: 10px"> |
| | | <el-card> |
| | | <div slot="header"> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <span>标准参数</span> |
| | | <span>装箱明细</span> |
| | | </el-col> |
| | | <el-col :span="8" :offset="4"> |
| | | <!-- <el-button |
| | |
| | | </el-button> --> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <!-- <el-button |
| | | <el-button |
| | | style="float: right; padding: 3px 0" |
| | | type="text" |
| | | :disabled="isSubmit" |
| | | v-thinclick="`dataFormTestStandardParam`" |
| | | v-if="editable" |
| | | @click="addpreserve" |
| | | >保存 |
| | | </el-button> --> |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <!-- <el-button |
| | | <el-button |
| | | v-if="!isCheck" |
| | | style="float: right; padding: 3px 0" |
| | | type="text" |
| | | @click="relateOperationParam()" |
| | | v-if="editable" |
| | | >添加 |
| | | </el-button> --> |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <!-- <span style="font-weight:500" v-if="testNo.length > 0" |
| | | >您当前选择的检测标准编号是:<span style="color:#066EFF">{{ |
| | | testNo |
| | | }}</span></span |
| | | > --> |
| | | </el-row> |
| | | </div> |
| | | <el-table |
| | | :data="testStandardParams" |
| | | id="testStandardParamTable" |
| | | ref="testStandardParam" |
| | | :default-sort="{ prop: 'index' }" |
| | | |
| | | highlight-current-row |
| | | height="700" |
| | | style="width: 100%" |
| | |
| | | stripe |
| | | > |
| | | <el-table-column |
| | | prop="index" |
| | | type ="index" |
| | | label="序号" |
| | | align="center" |
| | | width="50" |
| | | /> |
| | | <!-- <el-table-column |
| | | label="是否引用工艺参数" |
| | | prop="isReference" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-select |
| | | v-model="scope.row.isReference" |
| | | placeholder="请选择" |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in referenceOptions" |
| | | :key="index" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="是否抽检" prop="isCheck" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-select |
| | | v-model="scope.row.isCheck" |
| | | placeholder="请选择" |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in isCheckOptions" |
| | | :key="index" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="线芯" |
| | | prop="wireCore" |
| | | align="center" |
| | | width="60" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.wireCore"></el-input> |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-table-column label="参数编号" prop="code" align="center" /> |
| | | <el-table-column |
| | | label="参数项" |
| | | prop="parameterItem" |
| | | label="产品" |
| | | prop="product" |
| | | align="center" |
| | | /> |
| | | <el-table-column |
| | | label="要求范围" |
| | | prop="referenceValue" |
| | | label="产品编号" |
| | | prop="productNo" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="默认值" |
| | | prop="defaultValue" |
| | | label="规格型号" |
| | | prop="specs" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="参数项类型" |
| | | prop="paramType" |
| | | label="单位" |
| | | prop="unit" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="参数格式" |
| | | prop="parameterFormat" |
| | | label="数量" |
| | | prop="number" |
| | | align="center" |
| | | width="80" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.parameterFormat"></el-input> |
| | | <el-input v-model="scope.row.number"></el-input> |
| | | </template> |
| | | </el-table-column><el-table-column |
| | | label="测试方法" |
| | | prop="purpose" |
| | | align="center" |
| | | width="80" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="测试目的" |
| | | prop="method" |
| | | fixed="right" |
| | | label="操作" |
| | | align="center" |
| | | width="80" |
| | | > |
| | | width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="deleteadd(scope.row)" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="单位" prop="unit" align="center" /> |
| | | </el-table> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | </basic-container> |
| | | |
| | | <!-- 新增 --> |
| | | <packfrom |
| | | :currshowlist.sync="addOrUpdateVisible" |
| | | @refreshDataList="getData"> |
| | | </packfrom> |
| | | <packfromadd |
| | | :currshowlist.sync="increase" |
| | | :packageBoxIddata ="packageBoxId" |
| | | @handleSelectionChange = "preserve" |
| | | > |
| | | </packfromadd> |
| | | </basic-container> |
| | | <el-dialog title="标签列表" top="5vh" :visible.sync="diaPrintTab" width="500px"> |
| | | <div style="width:100%;height: 400px;overflow-y: auto;"> |
| | | <div id="qrCard" class="dia_body"> |
| | | <el-card class="box-card" v-for="(item, i) in qrData" :key="i" style="margin-bottom: 10px;"> |
| | | <el-row> |
| | | <el-col :span="10" :offset="3">序号:</el-col> |
| | | <el-col :span="10" style="font-weight: bold;">{{ i + 1 }}</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="10" :offset="3">包装编号:</el-col> |
| | | <el-col :span="10" style="font-weight: bold;">{{ item.packageNo }}</el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="10" :offset="3">包装台账二维码:</el-col> |
| | | <el-col :span="10"> |
| | | <vueQr :text="JSON.stringify(item)" :size="110" :margin="1"></vueQr> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="diaPrintTab = false">取 消</el-button> |
| | | <el-button type="primary" @click="printFun">打 印</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { pagedata,dropById,list,saveList,deledata,sAuditstatus} from '@/api/quality/Packaging_ledger' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import packfrom from './pack-from.vue' |
| | | import packfromadd from './pack-fromadd.vue' |
| | | import vueQr from 'vue-qr' |
| | | import PrintJS from 'print-js' |
| | | export default { |
| | | data(){ |
| | | return { |
| | | qrData:[], |
| | | diaPrintTab: false, |
| | | multipleSelection: [], |
| | | isCheck: false, |
| | | dataway:{}, |
| | | goid:'', |
| | | testStandardParams: [], |
| | | packageBoxId:{}, |
| | | prelang: 'operation', |
| | | dataListLoading: false, |
| | | ajaxFun: pagedata, |
| | | increase:false, |
| | | addOrUpdateVisible:false, |
| | | options: { |
| | | height: 300, // 默认高度-为了表头固定 |
| | | stripe: true, // 是否为斑马纹 table |
| | |
| | | lazy: false, // 是否需要懒加载 |
| | | fit: true, // 列的宽度是否自撑开 |
| | | multiSelect: true, // |
| | | isEdit:false, |
| | | seqNo: true, |
| | | isShowHide: true, // 是否显示显影按钮 |
| | | isRefresh: true, // 是否显示刷新按钮 |
| | |
| | | data: [], |
| | | // 标题 |
| | | column: [ |
| | | { |
| | | minWidth: 'code', |
| | | prop: 'state', |
| | | label: '状态', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'oo', |
| | | label: '订单编号', |
| | | prop: 'packageNo', |
| | | label: '包装编号', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | },{ |
| | | minWidth: '140', |
| | | prop: 'materhhooial', |
| | | label: '质量追溯号', |
| | | prop: 'createUser', |
| | | label: '创建人', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | },{ |
| | | minWidth: '140', |
| | | prop: 'contractNo', |
| | | label: '合同号', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'mateuurial', |
| | | label: '产品名称', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'materoiial', |
| | | label: '规格型号', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'matperoial', |
| | | label: '单位', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'materpial', |
| | | label: '数量', |
| | | prop: 'updateUser', |
| | | label: '更新人', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | |
| | | { |
| | | minWidth: '130', |
| | | width: '150', |
| | | prop: 'dealTime', |
| | | label: '入库时间', |
| | | prop: 'updateTime', |
| | | label: '更新日期', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'datetimerange', |
| | | }, |
| | | { |
| | | minWidth: '130', |
| | | width: '150', |
| | | prop: 'createTime', |
| | | label: '创建日期', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | |
| | | }, |
| | | ], |
| | | toolbar: [ |
| | | { |
| | | text: 'xxx', |
| | | type: 'primary', |
| | | }, |
| | | { |
| | | text: '新增', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }, |
| | | { |
| | | text: '标签打印', |
| | | type: 'primary', |
| | | fun: this.printLabel |
| | | }, |
| | | ], |
| | | operator: [ |
| | | { |
| | | text: '检验', |
| | | icon: 'el-icon-position', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.check |
| | | },{ |
| | | text: '删除', |
| | | icon: 'el-icon-delete', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | } |
| | | ], |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: '操作', |
| | | width: 120, |
| | | minWidth: 120 |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | medthods: {}, |
| | | // computed: { |
| | | // ...mapGetters(['permissions']) |
| | | // }, |
| | | components: { |
| | | ttable |
| | | ttable, |
| | | packfrom, |
| | | packfromadd, |
| | | vueQr |
| | | }, |
| | | watch: { |
| | | diaPrintTab(newVal){ |
| | | if(!newVal){ |
| | | this.qrData = [] |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | //打印按钮 |
| | | printFun() { |
| | | this.diaPrintTab = false; |
| | | PrintJS({ |
| | | printable: 'qrCard',//页面 |
| | | type: "html",//文档类型 |
| | | maxWidth:450, |
| | | targetStyles:['*'], |
| | | style: `@page { |
| | | margin:0; |
| | | padding: 0; |
| | | size: 360px 170px; |
| | | } |
| | | html{ |
| | | zoom:100%; |
| | | } |
| | | @media print{ |
| | | width: 360px; |
| | | height: 170px; |
| | | margin:0; |
| | | padding: 0; |
| | | }`, |
| | | onPrintDialogClose: this.erexcel=false, |
| | | targetStyles: ["*"], // 使用dom的所有样式,很重要 |
| | | font_size: '', |
| | | }); |
| | | }, |
| | | handleSelectionChange(val){ |
| | | this.multipleSelection = val |
| | | let lastRow = val[val.length - 1] |
| | | this.handleCurrentChange(lastRow) |
| | | }, |
| | | printLabel(){ |
| | | if(this.multipleSelection.length==0){ |
| | | this.$message.warning('请选择一条数据') |
| | | return |
| | | } |
| | | this.diaPrintTab = true |
| | | this.multipleSelection.forEach(item=>{ |
| | | let obj = { |
| | | packageNo: item.packageNo, |
| | | contractNo: item.contractNo, |
| | | boxInfo: [] |
| | | } |
| | | list({packageBoxId:item.id}).then((res) =>{ |
| | | res.data.data.forEach(ele=>{ |
| | | obj.boxInfo.push({ |
| | | product: ele.product, |
| | | productNo: ele.productNo, |
| | | specs: ele.specs, |
| | | unit: ele.unit, |
| | | number: ele.number |
| | | }) |
| | | }) |
| | | }) |
| | | this.qrData.push(obj) |
| | | }) |
| | | }, |
| | | // 获取数据列表 |
| | | getData() { |
| | | this.$refs.processconfiguration.refreshData() |
| | | }, |
| | | wayRenovate(){ |
| | | this.getData() |
| | | }, |
| | | //add |
| | | addOrUpdateHandle(){ |
| | | this.addOrUpdateVisible = true |
| | | }, |
| | | //删除 |
| | | deleteHandle(row){ |
| | | dropById({id:row.id}).then((res) =>{ |
| | | this.getData() |
| | | this.$message.success('删除成功') |
| | | }) |
| | | }, |
| | | handleCurrentChange(row){ |
| | | if(row.state=='已报检'){ |
| | | this.isCheck = true |
| | | } |
| | | this.dataway = row |
| | | this.packageBoxId = { |
| | | packageBoxId:row.id |
| | | } |
| | | this.goid = row.id |
| | | this.rightquery() |
| | | }, |
| | | rightquery(){ |
| | | list({packageBoxId:this.goid}).then((res) =>{ |
| | | this.testStandardParams = res.data.data |
| | | }) |
| | | }, |
| | | //详情添加 |
| | | relateOperationParam(){ |
| | | if (this.dataway.state == "未报检") { |
| | | this.increase = true |
| | | }else{ |
| | | this.$message.error('请先选择包装项目') |
| | | } |
| | | }, |
| | | preserve(datalist){ |
| | | this.testStandardParams = datalist |
| | | }, |
| | | //右边保存 |
| | | addpreserve(){ |
| | | this.testStandardParams.forEach(el => { |
| | | el.packageBoxId =this.goid |
| | | }); |
| | | saveList(this.testStandardParams).then((res) =>{ |
| | | this.$message.success('保存成功') |
| | | this.rightquery() |
| | | }) |
| | | }, |
| | | //删除 |
| | | deleteadd(row){ |
| | | deledata({id:row.id}).then((res)=>{ |
| | | this.$message.success('删除成功') |
| | | this.rightquery() |
| | | }) |
| | | }, |
| | | //审核 |
| | | check(row){ |
| | | let packageBox = { |
| | | id:row.id, |
| | | packageNo:row.packageNo, |
| | | contractNo:row.contractNo, |
| | | customerId:row.customerId, |
| | | } |
| | | sAuditstatus(packageBox).then((res) =>{ |
| | | this.getData() |
| | | this.$message.success('检验成功') |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |