Merge remote-tracking branch 'origin/master'
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios' |
| | | |
| | | export function fetchList(query) { |
| | | return request({ |
| | | url: '/mes/finishedIncome/page', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | |
| | | responseType : 'blob', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function updateLocationIdById(obj) { |
| | | return request({ |
| | | url: '/mes/qualityFinishedInspect/'+obj.id, |
| | | method: 'post', |
| | | params: obj |
| | | }) |
| | | } |
| | |
| | | import QuotaForm from '@/views/accounting/unitworkfactor/updateQuota-form.vue' |
| | | import { mapGetters } from 'vuex' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import { remote } from '../../../api/admin/dict' |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | }, |
| | | watch: { |
| | | currshowlist() { |
| | | console.log(22211); |
| | | this.innerVisible = this.currshowlist |
| | | } |
| | | }, |
| | |
| | | methods: { |
| | | // è·åæ°æ®å表 |
| | | getData() { |
| | | this.$refs.paramTable.getDataList() |
| | | this.$refs.paramTable.getDataList() |
| | | }, |
| | | handleSelectionChange(val){ |
| | | let data = val |
| | |
| | | this.datalistid = el |
| | | }); |
| | | }, |
| | | saveSelectRow() { |
| | | console.log(this.packageBoxIddata,"123"); |
| | | // saveList ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{ |
| | | // console.log(res); |
| | | // if (res.status === 200) { |
| | | // this.$message.success('æ°å¢æå') |
| | | // }else{ |
| | | // this.$message.error('å建失败') |
| | | // } |
| | | // })) |
| | | this.innerVisible = false |
| | | // this.$emit('handleSelectionChange',this.innerVisible ) |
| | | }, |
| | | handleSelectionChange(val){ |
| | | this.datalist = val |
| | | console.log(this.datalist,"æ°æ®"); |
| | | }, |
| | | saveSelectRow(){ |
| | | this.$emit('handleSelectionChange',this.datalist ) |
| | |
| | | </div> |
| | | <div class="page-main"> |
| | | <div class="finishedProduct-basic"> |
| | | <el-form :model="processInspectVo" ref="addInspectionform" class="l-mes" |
| | | <el-form :model="processInspectVo" :rules="processInspectRules" ref="addInspectionform" class="l-mes" |
| | | label-position="right" label-width="120px" style="width: 100%" size="small"> |
| | | <div class="formwrapper"> |
| | | <el-row> |
| | |
| | | autocomplete="off" :disabled="processInspectVo.id != null" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6" v-if="processInspectVo.id != null"> |
| | | <el-form-item label="æ¹æ¬¡å·ï¼"> |
| | | <el-input v-model="processInspectVo.outBatchNo" autocomplete="off" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6" v-if="processInspectVo.id != null"> |
| | | <el-form-item label="产ååæ ¼åºä½ï¼" prop="locationId"> |
| | | <el-select @change="changeLocation" clearable style="width:100%" |
| | | v-model="processInspectVo.locationId" placeholder="è¯·éæ©åæ ¼åºä½" |
| | | autocomplete="off"> |
| | | <el-option v-for="(item,i) in locationList" :key="i" |
| | | :label="item.locName+'-'+item.locNo" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | |
| | | <el-table-column prop="required" label="æ åå¼" width="240" ></el-table-column> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="æ£æµå¼" |
| | | width="240" style="text-align: center;"> |
| | | |
| | | <template slot-scope="scope"> |
| | | <el-col v-if="scope.row.itype === '1'"> |
| | | <el-tooltip v-if="scope.row.iname!=null" :disabled="scope.row.eId != null" |
| | | class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | @blur="changeState(scope.row)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | <span v-if="resultVal != null" v-text="scope.row.empiricalValueAddss[index]"></span> |
| | | </el-tooltip> |
| | | </el-col> |
| | | <el-col v-else> |
| | | <el-tooltip v-if="scope.row.iname != null" :disabled="scope.row.eId != null" |
| | | class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" placement="top-start"> |
| | | <el-select style="width: 100%;" @change="changeState(scope.row, index)" :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" placeholder="è¯·éæ©"> |
| | | <el-select style="width: 100%;" @change="changeState(scope.row)" :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in dataVal" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | |
| | | <template slot-scope="scope"> |
| | | <span v-if="resultVal!=null && processInspectVo.id!=null" v-text="scope.row.ename"></span> |
| | | <div v-else> |
| | | <!-- <el-input v-model="scope.row.eId" v-if="scope.row.iname != null" placeholder="请è¾å
¥è®¾å¤å·"></el-input> --> |
| | | <el-select style="width:100%" v-model="scope.row.eId" |
| | | v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row,scope.$index)"> |
| | | v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row)"> |
| | | <el-option v-for="(item,index) in deviceList" |
| | | :key="index" :value="item.id" :label="item.number +'-'+ item.name"></el-option> |
| | | :key="index" :value="item.id" :label="item.code +'-'+ item.name"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="inspectionValue" :key="index" |
| | | <el-table-column prop="inspectionValue"> |
| | | label="æ£éªæè¿°" width="240" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-col v-if="scope.row.itype === '1'"> |
| | |
| | | |
| | | <el-input :disabled="scope.row.eId == null" |
| | | v-model="scope.row.inote" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£éªæè¿°"></el-input> |
| | | @blur="changeState(scope.row)" placeholder="请è¾å
¥æ£éªæè¿°"></el-input> |
| | | |
| | | <span v-if="resultVal != null && processInspectVo.id != null" |
| | | v-text="scope.row.inote"></span> |
| | |
| | | class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" placement="top-start"> |
| | | <el-input :disabled="scope.row.eId == null" |
| | | v-model="scope.row.inote" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | <!-- <el-select style="width: 100%;" @change="changeState(scope.row, index)" :disabled="scope.row.eId == null" v-model="scope.row.inote" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in dataVal" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> --> |
| | | @blur="changeState(scope.row)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | <span v-if="resultVal != null && processInspectVo.id != null" |
| | | v-text="scope.row.inote"></span> |
| | | </el-tooltip> |
| | |
| | | updateFinishedInsProduct, |
| | | updateFinishedInspectById, |
| | | selectDeviceAPI, |
| | | updateLocationIdById, |
| | | } from '@/api/quality/finishedProduct' |
| | | import { selectDevice } from '@/api/quality/rawMaterial' |
| | | import { getIfsLocationByGroupCopyAll } from '@/api/warehouse/location' |
| | | import { remote } from '@/api/admin/dict' |
| | | export default { |
| | | data() { |
| | | return { |
| | | locationList: [], |
| | | dataVal: [{ |
| | | label: 'æ¯', |
| | | value: 'æ¯' |
| | |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | | empiricalValueAddMaxNumber: 0, |
| | | processInspectRules: { |
| | | locationId: [{required: true,message:'è¯·éæ©åºä½å·',trigger:'blur'}] |
| | | }, |
| | | processInspectVo: { |
| | | id: null, |
| | | finInsNo: null, |
| | |
| | | specificationsModel: null, |
| | | unit: null, |
| | | technologyId: null, |
| | | documentId: null |
| | | documentId: null, |
| | | outBatchNo: null, |
| | | locationId: null, |
| | | }, |
| | | inspectionItems: [], // æ°å¢æ£éªé¡¹ç®è¡¨æ ¼ |
| | | inspectionResultForm: [], |
| | |
| | | let val = sessionStorage.getItem("finished-resultVal-"+this.processInspectVo.id); |
| | | val == undefined ? this.resultVal=null : this.resultVal = val |
| | | } |
| | | this.getIfsLocation() |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | |
| | | changeLocation(val){ |
| | | if(val){ |
| | | let obj = { |
| | | id: this.processInspectVo.id, |
| | | locationId: val |
| | | } |
| | | updateLocationIdById(obj).then(res=>{ |
| | | if(res.status===200){ |
| | | this.$message.success("æ´æ°åæ ¼åºä½æå") |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | getIfsLocation(){ |
| | | getIfsLocationByGroupCopyAll({locationGroup: '1'}).then(res=>{ |
| | | if(res.status===200){ |
| | | this.locationList = res.data.data |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error); |
| | | }) |
| | | }, |
| | | submitSave(){ |
| | | let locationId = this.processInspectVo.locationId |
| | | if(locationId==null){ |
| | | this.$message.error("è¯·éæ©äº§ååæ ¼åºä½") |
| | | return |
| | | } |
| | | let pro = 0 |
| | | this.inspectionItems.forEach(item => { |
| | | if(item.children){ |
| | |
| | | this.processInspectVo.unit = result.punit |
| | | this.processInspectVo.quantity = result.quantity |
| | | this.processInspectVo.documentId = result.documentId |
| | | this.processInspectVo.outBatchNo = result.outBatchNo |
| | | this.processInspectVo.locationId = result.locationId |
| | | let userList = [] |
| | | result.children.forEach(item=>{ |
| | | item.iid = Math.random() |
| | |
| | | }, |
| | | getDeviceList(){ |
| | | selectDeviceAPI(null).then(res=>{ |
| | | // this.deviceList = res.data.data |
| | | console.log(res); |
| | | this.deviceList = res.data.data |
| | | |
| | | }) |
| | | }, |
| | | updateDevice(row,index){ |
| | | updateDevice(row){ |
| | | let rowId=JSON.stringify(row.iid) |
| | | console.log(row); |
| | | updateDeviceById({deviceId:row.eId,fpid:row.iid}).then(res=>{ |
| | | this.inspectionItems.forEach(obj=>{ |
| | | obj.children.forEach(c=>{ |
| | |
| | | c.inote='' |
| | | } |
| | | }) |
| | | |
| | | // if(obj.children){ |
| | | // obj.children[index-1].inspectionValue = '' |
| | | // obj.children[index-1].iresult = null |
| | | // obj.children[index-1].empiricalValueAddss = [] |
| | | // obj.children[index-1].inote='' |
| | | |
| | | // } |
| | | }) |
| | | }).catch(error=>{ |
| | | console.log(error) |
| | |
| | | this.processInspectVo.unit = sample.unit |
| | | this.processInspectVo.documentId = sample.documentId |
| | | }, |
| | | changeState(row, index) { |
| | | changeState(row) { |
| | | if (row.iid != null && row.iid != '') { |
| | | let str = "" |
| | | row.empiricalValueAddss.forEach(e => { |
| | |
| | | import { transform } from '@/util/fileTransform' |
| | | import printTemplate from './finishedProducter-print.vue' |
| | | import PrintJS from 'print-js' |
| | | import { title } from 'process' |
| | | import { title } from 'process' |
| | | export default { |
| | | components: { |
| | | finishedProductInspectionAdd, |
| | |
| | | <ttable |
| | | :table="table" |
| | | :isShowHide="true" |
| | | :ajaxFun="ajaxFun" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | ref="processconfiguration" |
| | |
| | | |
| | | <script> |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import { fetchList, } from '@/api/quality/finishedDelivery' |
| | | |
| | | export default { |
| | | data(){ |
| | | return { |
| | | ajaxFun: fetchList, |
| | | prelang: 'operation', |
| | | dataListLoading: false, |
| | | options: { |
| | |
| | | column: [ |
| | | { |
| | | minWidth: '140', |
| | | prop: 'oo', |
| | | label: '订åç¼å·', |
| | | prop: 'packageNo', |
| | | label: 'å
è£
ç¼å·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | },{ |
| | | minWidth: '140', |
| | | prop: 'materhhooial', |
| | | label: 'è´¨é追溯å·', |
| | | prop: 'outBatchNo', |
| | | label: 'æ¹æ¬¡å·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'mateuurial', |
| | | prop: 'partNo', |
| | | label: '产åç¼å·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'partName', |
| | | label: '产ååç§°', |
| | | isTrue: true, |
| | | isSearch: true, |
| | |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'materoiial', |
| | | prop: 'specs', |
| | | label: 'è§æ ¼åå·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'matperoial', |
| | | prop: 'unit', |
| | | label: 'åä½', |
| | | isTrue: true, |
| | | isSearch: true, |
| | |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'materpial', |
| | | prop: 'number', |
| | | label: 'æ°é', |
| | | isTrue: true, |
| | | isSearch: true, |
| | |
| | | }, |
| | | { |
| | | minWidth: '130', |
| | | width: '150', |
| | | prop: 'dealTime', |
| | | prop: 'createTime', |
| | | label: 'å
¥åºæ¶é´', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'datetimerange', |
| | | // formatter: this.formatDateTime, |
| | | }, |
| | | ], |
| | | toolbar: [ |
| | | formatter: this.formatDateTime, |
| | | }, |
| | | { |
| | | text: 'xxx', |
| | | type: 'primary', |
| | | // fun: this.addOrUpdateHandle |
| | | minWidth: '130', |
| | | prop: 'createUser', |
| | | label: 'å建人', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | ], |
| | | toolbar: [], |
| | | // operator: [], |
| | | // operatorConfig: {} |
| | | }, |
| | | } |
| | | }, |
| | | medthods: {}, |
| | | // computed: { |
| | | // ...mapGetters(['permissions']) |
| | | // }, |
| | | // computed: { |
| | | // ...mapGetters(['permissions']) |
| | | // }, |
| | | components: { |
| | | ttable |
| | | ttable |
| | | }, |
| | | medthods: { |
| | | formatDateTime(row, column, cellValue) { |
| | | return cellValue ? fecha.format(new Date(cellValue), 'yyyy-MM-dd') : '' |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | searchInfoType: 'text', |
| | | }, |
| | | ], |
| | | toolbar: [ |
| | | { |
| | | text: 'xx', |
| | | type: 'primary', |
| | | // fun: this.addOrUpdateHandle |
| | | }, |
| | | ], |
| | | toolbar: [], |
| | | // operator: [], |
| | | // operatorConfig: {} |
| | | }, |