Browse Source

2024.9.3 一、加工中心上传SOP(第一版)

二、生产订单-生产通知单(第一版)
master
yuejiayang 1 year ago
parent
commit
9f1739f6a4
  1. 12
      src/api/base/site.js
  2. 3
      src/api/shopOrder/shopOrder.js
  3. 517
      src/views/modules/base/workCenter.vue
  4. 557
      src/views/modules/shopOrder/shopOrder/shopNotice.vue

12
src/api/base/site.js

@ -165,3 +165,15 @@ export const updateRevNoData= data => createAPI(`/base/updateRevNoData`,'post',d
// 获取当前物料最大工序
export const getPartNoRouteInMaxItemNo= data => createAPI(`/base/getPartNoRouteInMaxItemNo`,'post',data)
// 获取当前机台的SOP文件
export const sopFileListSearch= data => createAPI(`/base/sopFileListSearch`,'post',data)
// 删除当前机台的SOP文件
export const deleteSOPFile= data => createAPI(`/base/deleteSOPFile`,'post',data)
// 上传SOP文件
export const uploadSOPFile= data => createAPI(`/base/uploadSOPFile`,'post',data)
// 编辑SOP文件信息
export const sopFileEdit= data => createAPI(`/base/sopFileEdit`,'post',data)

3
src/api/shopOrder/shopOrder.js

@ -95,5 +95,6 @@ export const deleteShopOrderToolData = data => createAPI('/shopOrder/deleteShopO
// 更改生产工单工艺路线
export const shopOrderUpdateRoutingViaRev = data => createAPI('/shopOrder/shopOrderUpdateRoutingViaRev', 'post', data)
// 查询工单的工具信息
export const shopNoticeSearch = data => createAPI('/shopOrder/shopNoticeSearch', 'post', data)

517
src/views/modules/base/workCenter.vue

@ -109,6 +109,7 @@
<el-button @click="editResource()" v-if="!authEdit" type="primary" style="margin-left: 2px;margin-top: 0px">{{buttons.update}}</el-button>
<el-button @click="deleteCalendar()" v-if="!authDelete" type="primary" style="margin-left: 2px;margin-top: 0px">{{buttons.delete}}</el-button>
<el-button @click="setResource()" type="primary" style="margin-left: 2px;margin-top: 0px">{{buttons.setResource}}</el-button>
<el-button @click="uploadSOP()" type="primary" style="margin-left: 2px;margin-top: 0px">上传SOP</el-button>
</el-form>
<el-table
:height="height"
@ -320,7 +321,152 @@
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<el-dialog title="上传机器SOP" :close-on-click-modal="false" v-drag :visible.sync="uploadSOPFlag" width="630px" >
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item :label="labels.workCenterNo">
<el-input v-model="sopModelData.workCenterNo" disabled style="width: 116px"></el-input>
</el-form-item>
<el-form-item :label="labels.workCenterDesc">
<el-input v-model="sopModelData.workCenterDesc" disabled style="width: 260px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item :label="labels.resourceID">
<el-input v-model="sopModelData.resourceID" disabled style="width: 116px"></el-input>
</el-form-item>
<el-form-item :label="labels.resourceDesc">
<el-input v-model="sopModelData.resourceDesc" disabled style="width: 260px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="版本号">
<el-input v-model="sopModelData.versionNumber" disabled style="width: 116px"></el-input>
</el-form-item>
<el-form-item label="生效日期" prop="effectiveDate" :rules="rules.effectiveDate">
<el-date-picker
style="width: 123px"
v-model="sopModelData.effectiveDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="失效日期">
<el-date-picker
style="width: 123px"
v-model="sopModelData.expiryDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 5px;">
<el-form-item label="">
<a href="javascript:void(0);" @click="triggerUpload">SOP文件(点击上传)</a>
<tr></tr>
<el-input v-model="this.fileName" readonly placeholder="文件名称" style="width: 391px"></el-input>
<el-button type="primary" @click="uploadSOPSave">保存</el-button>
<el-upload class="custom-upload" :file-list="fileList"
action="javascript:void(0);" ref="uploadFile"
:on-change="onChange" :on-close="closeFileUpdate"
multiple :auto-upload="false"
style="text-align: left;margin-top: 0px;margin-left: 6px;display: none;">
</el-upload>
</el-form-item>
</el-form>
<el-table
:height="height - 200"
:data="sopFileList"
border
highlight-current-row
v-loading="dataListLoading"
style="width: 100%;margin-top: 17px">
<el-table-column
v-for="(item,index) in columnSopFileList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="80"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="updateSOPFile(scope.row)">编辑</a>
<a type="text" size="small" @click="deleteSOPFile(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="closeUploadFileVisible()">{{buttons.close}}</el-button>
</el-footer>
</el-dialog>
<el-dialog title="编辑机器SOP" :close-on-click-modal="false" v-drag :visible.sync="uploadSOPEditFlag" width="427px" >
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item :label="labels.workCenterNo">
<el-input v-model="sopUpdateModelData.workCenterNo" disabled style="width: 116px"></el-input>
</el-form-item>
<el-form-item :label="labels.workCenterDesc">
<el-input v-model="sopUpdateModelData.workCenterDesc" disabled style="width: 260px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item :label="labels.resourceID">
<el-input v-model="sopUpdateModelData.resourceID" disabled style="width: 116px"></el-input>
</el-form-item>
<el-form-item :label="labels.resourceDesc">
<el-input v-model="sopUpdateModelData.resourceDesc" disabled style="width: 260px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="版本号">
<el-input v-model="sopUpdateModelData.versionNumber" disabled style="width: 116px"></el-input>
</el-form-item>
<el-form-item label="生效日期" prop="effectiveDate" :rules="rules.effectiveDate">
<el-date-picker
style="width: 123px"
v-model="sopUpdateModelData.effectiveDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="失效日期">
<el-date-picker
style="width: 123px"
v-model="sopUpdateModelData.expiryDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: 5px;">
<el-form-item label="SOP文件">
<el-input v-model="this.fileName" disabled placeholder="文件名称" style="width: 391px"></el-input>
</el-form-item>
</el-form>
<el-footer style="height:30px;margin-top: 3px;text-align:center">
<el-button type="primary" @click="updateSopFile">保存</el-button>
<el-button type="primary" @click="closeUploadFileEditVisible()">{{buttons.close}}</el-button>
</el-footer>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
@ -342,7 +488,9 @@ import {
deleteWorkCenterData,
saveResource,
deleteResource,
setResourceFlag
setResourceFlag,
sopFileListSearch,
deleteSOPFile,
}from "@/api/base/site.js"
import {
searchPartNoData,
@ -353,6 +501,7 @@ import {
searchFunctionButtonList,
} from "@/api/sysLanguage.js"
import {uploadSOPFile,sopFileEdit} from "../../../api/base/site";
var functionId='103004';
export default {
@ -452,6 +601,15 @@ export default {
download2:'导出机台'
},
rules: {
effectiveDate: [
{
required: true,
message: ' ',
trigger: ['blur','change']
}
]
},
queryButton: {
functionId: functionId,
table_id: '*',
@ -497,6 +655,36 @@ export default {
modelFlag2:false,
modelFlag:false,
modelInputFlag:true,
fileName:'',
uploadSOPFlag:false,
uploadSOPEditFlag:false,
uploadSOPDisableFlag:true,
sopFileList:[],
fileList:[],
sopModelData:{
flag:'',
id : '',
workCenterNo:'',
workCenterDesc: '',
site:'',
resourceID:'',
resourceDesc:'',
versionNumber:'',
effectiveDate:'',
expiryDate:'',
},
sopUpdateModelData:{
flag:'',
id : '',
workCenterNo:'',
workCenterDesc: '',
site:'',
resourceID:'',
resourceDesc:'',
versionNumber:'',
effectiveDate:'',
expiryDate:null,
},
selectList:[],
modelData: {
add:'',
@ -1021,6 +1209,134 @@ export default {
columnWidth: 80
}
],
columnSopFileList:[
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4VersionNumber',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "versionNumber",
headerAlign: "center",
align: "center",
columnLabel: "版本号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4FileName',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "fileName",
headerAlign: "center",
align: "left",
columnLabel: "文件名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4CreatedBy',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "createdBy",
headerAlign: "center",
align: "left",
columnLabel: "上传人",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4CreateDate',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "createDate",
headerAlign: "center",
align: "center",
columnLabel: "上传时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4EffectiveDate',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "effectiveDate",
headerAlign: "center",
align: "center",
columnLabel: "生效日期",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4ExpiryDate',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "expiryDate",
headerAlign: "center",
align: "center",
columnLabel: "失效日期",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4Status',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "status",
headerAlign: "center",
align: "center",
columnLabel: "状态",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
],
authEdit: false,
authAdd: false,
authDelete: false,
@ -1181,6 +1497,203 @@ export default {
})
})
},
formatDate(date) {
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0');
const day = String(date.getDate()).padStart(2, '0');
return `${year}-${month}-${day}`;
},
uploadSOP(){
if(this.currentRow2==null){
this.$alert(this.labels.resourceIn, this.labels.error, {
confirmButtonText: this.labels.true
})
return false;
}
this.sopModelData={
workCenterNo:this.currentRow2.workCenterNo,
workCenterDesc: this.currentRow2.workCenterDesc,
site:this.currentRow2.site,
resourceID:this.currentRow2.resourceID,
resourceDesc:this.currentRow2.resourceDesc,
versionNumber:'A01',
effectiveDate:this.formatDate(new Date()),
expiryDate:'',
};
this.sopFileListSearch();
this.uploadSOPFlag=true;
},
updateSOPFile(row){
this.sopUpdateModelData= {
id: row.id,
workCenterNo: this.currentRow2.workCenterNo,
workCenterDesc: this.currentRow2.workCenterDesc,
site: this.currentRow2.site,
resourceID: this.currentRow2.resourceID,
resourceDesc: this.currentRow2.resourceDesc,
versionNumber: row.versionNumber,
effectiveDate: new Date(row.effectiveDate),
expiryDate: row.expiryDate,
}
this.fileName = row.fileName;
this.uploadSOPDisableFlag=false
this.uploadSOPEditFlag=true;
},
sopFileListSearch(){
let inData={
orderRef1:this.currentRow2.site,
orderRef2:this.currentRow2.workCenterNo,
orderRef3:this.currentRow2.resourceID,
orderRef4:'',
fileType: 'SOP'
}
sopFileListSearch(inData).then(({data}) => {
// data
for (let i = 0; i < data.rows.length; i++) {
if (data.rows[i].expiryDate != null) {
if (data.rows[i].expiryDate < this.dayjs().format('YYYY-MM-DD')) {
data.rows[i].status = '失效'
} else {
data.rows[i].status = '有效'
}
} else {
data.rows[i].status = '有效'
}
this.sopFileList.push(data.rows[i]);
this.sopFileList[i].versionNumber = data.rows[i].orderRef4
}
// this.sopFileListversionNumberversionNumberversionNumber A + +1
if (this.sopFileList.length > 0) {
let versionNumber = this.sopFileList[this.sopFileList.length - 1].versionNumber;
// A10A0+A+
if (versionNumber.substring(1) < 9) {
this.sopModelData.versionNumber = 'A0' + (parseInt(versionNumber.substring(1)) + 1);
} else {
this.sopModelData.versionNumber = 'A' + (parseInt(versionNumber.substring(1)) + 1);
}
} else {
this.sopModelData.versionNumber = 'A01';
}
})
},
triggerUpload() {
this.$refs.uploadFile.$el.querySelector('input').click()
},
/*选择上传文件时*/
onChange(file,fileList){
const newFileName = file.name;
if (this.fileName) {
this.fileName += ', ' + newFileName;
} else {
this.fileName = newFileName;
}
this.fileList.push(file);
},
closeFileUpdate() {
this.fileName = '';
//this.fileRemark = ''
this.$refs.uploadFile.clearFiles()
this.fileList = []
},
uploadSOPSave() {
if (this.sopModelData.effectiveDate === '' || this.sopModelData.effectiveDate == null) {
this.$alert('请选择生效日期!', this.labels.error, {
confirmButtonText: this.labels.true
})
return false;
}
if (this.fileList.length === 0) {
this.$alert('上传的SOP文件不能为空!', this.labels.error, {
confirmButtonText: this.labels.true
})
return false;
}
const formData = new FormData();
//
for (let i = 0; i < this.fileList.length; i++) {
formData.append("file", this.fileList[i].raw)
}
formData.append("orderRef2", this.sopModelData.workCenterNo)
formData.append("orderRef1", this.sopModelData.site)
formData.append("orderRef3", this.sopModelData.resourceID)
formData.append("orderRef4", this.sopModelData.versionNumber)
formData.append("effectiveDate", this.sopModelData.effectiveDate)
if (this.sopModelData.expiryDate != null && this.sopModelData.expiryDate !== '') {
formData.append("expiryDate", this.sopModelData.expiryDate)
}
formData.append("fileType", 'SOP')
console.log(this.sopModelData.expiryDate)
uploadSOPFile(formData).then(({data}) => {
if (data && data.code === 0) {
this.uploadSOPFlag = false
this.$message.success(this.labels.doYes)
//
this.$refs.uploadFile.clearFiles();
this.closeFileUpdate();
this.sopFileList = []
} else {
this.$alert(data.msg, this.labels.error, {
confirmButtonText: this.labels.true
})
}
})
},
updateSopFile(){
if (this.sopModelData.effectiveDate === '' || this.sopModelData.effectiveDate == null) {
this.$alert('请选择生效日期!', this.labels.error, {
confirmButtonText: this.labels.true
})
return false;
}
let inData = {
id: this.sopUpdateModelData.id,
effectiveDate: this.sopUpdateModelData.effectiveDate,
expiryDate: this.sopUpdateModelData.expiryDate,
}
sopFileEdit(inData).then(({data}) => {
if (data && data.code === 0) {
this.sopFileList = [];
this.sopFileListSearch();
this.uploadSOPEditFlag = false
this.fileName = '';
this.$message.success(this.labels.doYes)
} else {
this.$alert(data.msg, this.labels.error, {
confirmButtonText: this.labels.true
})
}
})
},
deleteSOPFile(row){
this.$confirm('确认删除该文件?', this.labels.point, {
confirmButtonText: this.labels.true,
cancelButtonText: this.labels.cancel,
type: 'warning'
}).then(() => {
deleteSOPFile(row).then(({data}) => {
if (data && data.code === 0) {
this.sopFileList = [];
this.sopFileListSearch();
this.$message.success(this.labels.doYes)
} else {
this.$alert(data.msg, this.labels.error, {
confirmButtonText: this.labels.true
})
}
})
})
},
closeUploadFileVisible(){
this.uploadSOPFlag=false;
this.sopFileList=[];
this.fileList = [];
this.closeFileUpdate();
},
closeUploadFileEditVisible(){
this.uploadSOPEditFlag=false;
this.fileName = '';
},
deleteCalendar(){
if(this.currentRow2==null){
this.$alert(this.labels.resourceIn, this.labels.error, {

557
src/views/modules/shopOrder/shopOrder/shopNotice.vue

@ -0,0 +1,557 @@
<template>
<div class="mod-config">
<el-form
:inline="true"
label-position="top"
style="margin-top: 20px; position: fixed; top: 55px;left: 227px; z-index: 1000; background-color: white; padding: 10px; width: 100%;min-width: 1028px;max-width: 1292px;border: 3px solid #17B3A3;">
<el-form-item label="生产订单号(不支持模糊查询)">
<el-input v-model="searchData.orderNo" style="width: 130px"></el-input>
<el-checkbox
v-model="searchData.status"
label="status"
style="margin-left: 10px"
true-label="有效"
false-label="无效"
>
仅查询有效的SOP
</el-checkbox>
<el-button @click="getDataList()" type="primary" style="margin-left: 2px;margin-top: 0px">查询</el-button>
</el-form-item>
</el-form>
<br></br>
<br></br>
<fieldset style="margin-top: 5px; width: 100%;min-width: 1020px">
<legend>产品SOP信息</legend>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="客户" prop="uCustomer">
<el-input v-model="modelData.uCustomer" style="width: 310px"></el-input>
</el-form-item>
<el-form-item label="机种" prop="uModel" style="margin-left: 15px">
<el-input v-model="modelData.uModel" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="颜色标识" prop="uColorID" style="margin-left: 15px">
<el-input v-model="modelData.uColorID" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="生产通知单" prop="docEntry" style="margin-left: 15px">
<el-input v-model="modelData.docEntry" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="日期" prop="postDate" style="margin-left: 15px">
<el-input v-model="modelData.postDate" style="width: 141px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="客户料号" prop="uPn">
<el-input v-model="modelData.uPn" style="width: 310px"></el-input>
</el-form-item>
<el-form-item label="二阶料号" prop="uPn2" style="margin-left: 15px">
<el-input v-model="modelData.uPn2" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="样品卡号" prop="uSmplCard" style="margin-left: 15px">
<el-input v-model="modelData.uSmplCard" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="交期" prop="dueDate" style="margin-left: 15px">
<el-input v-model="modelData.dueDate" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="库存数量" prop="onHand" style="margin-left: 15px">
<el-input v-model="modelData.onHand" style="width: 141px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="料号" prop="itemCode">
<el-input v-model="modelData.itemCode" style="width: 310px"></el-input>
</el-form-item>
<el-form-item label="计划数量" prop="plannedQty" style="margin-left: 15px">
<el-input v-model="modelData.plannedQty + modelData.comments + modelData.uPackunit" style="width: 310px"></el-input>
</el-form-item>
<el-form-item label="制程" prop="uProcess" style="margin-left: 15px">
<el-input v-model="modelData.uProcess" style="width: 310px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="打样原因" prop="uStatus">
<el-input v-model="modelData.uStatus" style="width: 310px"></el-input>
</el-form-item>
<el-form-item label="送样数量" prop="uBhbum" style="margin-left: 15px">
<el-input v-model="modelData.uBhbum" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="尺寸" prop="uDimen" style="margin-left: 15px">
<el-input v-model="modelData.uDimen" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="跳距" prop="docEntry" style="margin-left: 15px">
<el-input v-model="modelData.docEntry" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="包装方式" prop="uPackage" style="margin-left: 15px">
<el-input v-model="modelData.uPackage" style="width: 141px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="物料描述" prop="itemName">
<el-input v-model="modelData.itemName" style="width: 480px"></el-input>
</el-form-item>
<el-form-item label="R角" prop="uRangle" style="margin-left: 15px">
<el-input v-model="modelData.uRangle" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="C角" prop="uCangle" style="margin-left: 15px">
<el-input v-model="modelData.uCangle" style="width: 141px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="注意事项" prop="uAttn">
<el-input
type="textarea"
v-model="modelData.uAttn"
style="width: 480px"
:rows="3">
</el-input>
</el-form-item>
<el-form-item label="上下间距" prop="uUddist" style="margin-left: 15px">
<el-input v-model="modelData.uUddist" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="左右间距" prop="uLrdist" style="margin-left: 15px">
<el-input v-model="modelData.uLrdist" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="其他保证标识要求" prop="uPackDesp" style="margin-left: 15px">
<el-input
type="textarea"
v-model="modelData.uPackDesp"
style="width: 140px"
:rows="7">
</el-input>
</el-form-item>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;margin-left: 509px">
<el-form-item label="边距" prop="uEdge">
<el-input v-model="modelData.uEdge" style="width: 141px;"></el-input>
</el-form-item>
<el-form-item label="虚线" prop="uDotline" style="margin-left: 15px">
<el-input v-model="modelData.uDotline" style="width: 141px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="SIP" prop="uSip">
<el-input v-model="modelData.uSip" style="width: 310px"></el-input>
</el-form-item>
<el-form-item label="样品卡" prop="uYangpinno" style="margin-left: 186px">
<el-input v-model="modelData.uYangpinno" style="width: 310px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="检查记录表" prop="uChSheet">
<el-input v-model="modelData.uChSheet" style="width: 310px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="刀模编号" prop="uMold">
<el-input v-model="modelData.uMold" style="width: 310px"></el-input>
</el-form-item>
<el-form-item label="刀模仓位" prop="uMoldNo" style="margin-left: 15px">
<el-input v-model="modelData.uMoldNo" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="刀模编号2" prop="uMold2" style="margin-left: 15px">
<el-input v-model="modelData.uMold2" style="width: 310px"></el-input>
</el-form-item>
<el-form-item label="刀模2仓位" prop="uMoldNo2" style="margin-left: 15px">
<el-input v-model="modelData.uMoldNo2" style="width: 141px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="菲林编号" prop="uFilm">
<el-input v-model="modelData.uFilm" style="width: 310px"></el-input>
</el-form-item>
<el-form-item label="网版编号" prop="uPlatenum" style="margin-left: 15px">
<el-input v-model="modelData.uPlatenum" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="网版目数" prop="uPlate" style="margin-left: 15px">
<el-input v-model="modelData.uPlate" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="模数" prop="uMoldQty" style="margin-left: 184px">
<el-input v-model="modelData.uMoldQty" style="width: 141px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item label="油墨型号" prop="uColor">
<el-input v-model="modelData.uColor" style="width: 310px"></el-input>
</el-form-item>
<el-form-item label="UL型号" prop="uUl" style="margin-left: 15px">
<el-input v-model="modelData.uUl" style="width: 310px"></el-input>
</el-form-item>
</el-form>
</fieldset>
<p>BOM物料清单</p>
<el-table
:data="dataList"
:height="height - 230"
border
style="width: 100%;margin-top: -10px">
<el-table-column prop="itemNo" label="序号" headerAlign="center" align="center" width="50px"></el-table-column>
<el-table-column prop="componentPartNo" label="物料号" headerAlign="center" width="170px" align="left"></el-table-column>
<el-table-column prop="partDesc" label="描述" headerAlign="center" align="left"></el-table-column>
<el-table-column prop="qtyRequired" label="计划数量" headerAlign="center" width="100px" align="right"></el-table-column>
<el-table-column prop="qtyOnHand" label="库存" headerAlign="center" width="100px" align="right"></el-table-column>
</el-table>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 0px;width: 100%;min-width: 1020px">
<el-form-item label="ECN#" prop="uEcn">
<el-input
type="textarea"
v-model="modelData.uEcn"
style="width: 310px"
:rows="3">
</el-input>
</el-form-item>
<el-form-item label="客诉履历" prop="uAttn2">
<el-input
type="textarea"
v-model="modelData.uAttn2"
style="width: 310px"
:rows="3">
</el-input>
</el-form-item>
<el-form-item label="检查难度" prop="uCheck">
<el-input v-model="modelData.uCheck" style="width: 141px"></el-input>
</el-form-item>
<el-form-item label="检查时间" prop="uCheckt">
<el-input v-model="modelData.uCheckt" style="width: 141px"></el-input>
</el-form-item>
<el-checkbox
v-model="modelData.uAttach1"
style="margin-left: 10px;margin-top: 5px"
>附件</el-checkbox>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: -7px;margin-left: 955px">
<el-checkbox
v-model="modelData.uAttach2"
style="margin-left: 10px"
>图纸</el-checkbox>
</el-form>
<el-form :inline="true" :model="modelData" label-position="top" label-width="100px" style="margin-top: 10px;margin-left: 955px">
<el-checkbox
v-model="modelData.uAttach3"
style="margin-left: 10px"
>刀线</el-checkbox>
</el-form>
<p>SOP清单</p>
<el-table
:height="height - 170"
:data="sopFileList"
border
highlight-current-row
style="width: 100%;margin-top: -10px">
<el-table-column
v-for="(item,index) in columnSopFileList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {shopNoticeSearch} from "../../../../api/shopOrder/shopOrder";
export default {
data() {
return {
height: 200,
dataList: [],
sopFileList: [],
searchData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
orderNo: '',
status: '有效',
},
modelData: {
uCustomer: '',
uModel: '',
uColorID: '',
docEntry: '',
postDate: '',
uPn: '',
uPn2: '',
uSmplCard: '',
dueDate: '',
onHand: '',
itemCode: '',
plannedQty: '',
uProcess: '',
uStatus: '',
uBhbum: '',
uDimen: '',
uPackage: '',
itemName: '',
uRangle: '',
uCangle: '',
uAttn: '',
uUddist: '',
uLrdist: '',
uPackDesp: '',
uDotline: '',
uSip: '',
uYangpinno: '',
uChSheet: '',
uMold: '',
uMoldNo: '',
uMold2: '',
uMoldNo2: '',
uFilm: '',
uPlatenum: '',
uPlate: '',
uMoldQty: '',
uColor: '',
uUl: '',
uEcn: '',
uAttn2: '',
uCheck: '',
uCheckt: '',
uattach1: '',
uattach2: '',
uattach3: '',
uAttach1: false,
uAttach2: false,
uAttach3: false,
comments: '',
uPackunit: '',
uEdge: '',
},
columnSopFileList:[
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4VersionNumber',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "versionNumber",
headerAlign: "center",
align: "center",
columnLabel: "版本号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4FileName',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "fileName",
headerAlign: "center",
align: "left",
columnLabel: "文件名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 300
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4ResourceID',
tableId: "103004Table2",
tableName: "SOP文件表",
columnProp: "resourceInfo",
headerAlign: "center",
align: "left",
columnLabel: "机台编码(名称)",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4CreatedBy',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "createdBy",
headerAlign: "center",
align: "left",
columnLabel: "上传人",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4CreateDate',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "createDate",
headerAlign: "center",
align: "center",
columnLabel: "上传时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4EffectiveDate',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "effectiveDate",
headerAlign: "center",
align: "center",
columnLabel: "生效日期",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4ExpiryDate',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "expiryDate",
headerAlign: "center",
align: "center",
columnLabel: "失效日期",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 103004,
serialNumber: '103004Table4Status',
tableId: "103004Table3",
tableName: "SOP文件表",
columnProp: "status",
headerAlign: "center",
align: "center",
columnLabel: "状态",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
],
}
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 225;
})
},
methods: {
getDataList() {
let inData = {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
orderNo: this.searchData.orderNo,
customer: this.searchData.customer,
}
this.dataList = []
this.sopFileList = []
shopNoticeSearch(inData).then(({data}) => {
if (data.code === 0) {
if ( data.rows1 !== null && data.rows1 !== undefined) {
data.rows1.uAttach1 = false
data.rows1.uAttach2 = false
data.rows1.uAttach3 = false
if (data.rows1.uattach1 === '有' || data.rows1.uattach1 === 'Y' || data.rows1.uattach1 === '样品') {
data.rows1.uAttach1 = true
} else if (data.rows1.uattach1 === '图纸') {
data.rows1.uAttach2 = true
} else if (data.rows1.uattach1 === '刀线') {
data.rows1.uAttach3 = true
}
if (data.rows1.uattach2 === '有' || data.rows1.uattach2 === 'Y' || data.rows1.uattach2 === '图纸') {
data.rows1.uAttach2 = true
}else if (data.rows1.uattach2 === '刀线') {
data.rows1.uAttach3 = true
} else if (data.rows1.uattach2 === '样品'){
data.rows1.uAttach1 = true
}
if (data.rows1.uattach3 === '有' || data.rows1.uattach3 === 'Y' || data.rows1.uattach3 === '刀线') {
data.rows1.uAttach3 = true
} else if (data.rows1.uattach3 === '图纸') {
data.rows1.uAttach2 = true
} else if (data.rows1.uattach3 === '样品') {
data.rows1.uAttach1 = true
}
this.modelData = data.rows1
}
this.dataList = data.rows2
// sopFileListorderRef4versionNumber
data.rows3.forEach((item) => {
item.versionNumber = item.orderRef4
item.resourceInfo = item.orderRef3 + '(' + item.resourceDesc + ')'
if (item.expiryDate !== null) {
if (new Date(item.expiryDate) < new Date()) {
item.status = '失效'
}
else {
item.status = '有效'
}
} else {
item.status = '有效'
}
if (this.searchData.status === '有效'){
if (item.status !== '失效'){
this.sopFileList.push(item)
}
} else {
this.sopFileList.push(item)
}
})
}
})
}
}
}
</script>
<style scoped>
.right-align-input ::v-deep .el-input__inner {
text-align: right;
}
</style>
Loading…
Cancel
Save