Browse Source

plm BMM

master
ruanqi 1 year ago
parent
commit
9c6f4ce8c9
  1. 1
      src/main.js
  2. 8
      src/views/modules/project/projectInfo/projectInfo.vue
  3. 2
      src/views/modules/project/projectPart/searchProjectPart.vue
  4. 41
      src/views/modules/tooling/searchToolApply.vue
  5. 46
      src/views/modules/tooling/toolingInfo.vue

1
src/main.js

@ -24,6 +24,7 @@ import selectDiv from '@/views/common/selectDiv.vue'
import {resetForm} from "./utils/system";
import echarts from "echarts";
import highlightContainer from './utils/highlight';
import 'element-ui/lib/theme-chalk/divider.css'
Vue.prototype.$echarts = echarts;
Vue.component('downloadExcel', JsonExcel)

8
src/views/modules/project/projectInfo/projectInfo.vue

@ -9,7 +9,7 @@
<!-- <el-input v-model="searchData.projectType" style="width: 120px"></el-input>-->
<dict-data-select dict-type="project_info_type_db" filterable clearable :use-default-value="false" v-model="searchData.projectType"></dict-data-select>
</el-form-item>
<el-form-item :label="'项目责人'">
<el-form-item :label="'项目责人'">
<el-input v-model="searchData.projectOwnerName" style="width: 130px"></el-input>
</el-form-item>
<el-form-item label=" ">
@ -132,7 +132,7 @@
</el-form-item>
</div></el-col>
<el-col :span="8"><div class="grid-content bg-purple">
<el-form-item :label="'项目责人'">
<el-form-item :label="'项目责人'">
<el-input v-model="projectData.projectOwnerName" readonly style="" ></el-input>
</el-form-item>
</div></el-col>
@ -162,6 +162,7 @@
</el-tab-pane>
<el-tab-pane label="客户信息" name="customer">
<el-divider content-position="left">直接客户</el-divider>
<el-form label-position="top" label-width="100px" >
<el-row :gutter="20">
<el-col :span="4"><div class="grid-content bg-purple">
@ -207,6 +208,7 @@
</el-form-item>
</div></el-col>
</el-row>
<el-divider content-position="left">终端客户</el-divider>
<el-row :gutter="20">
<el-col :span="4"><div class="grid-content bg-purple">
<el-form-item :label="'终端客户代码'">
@ -473,6 +475,7 @@
import ChangeRecord from "./com_project_change_record.vue";
import OssComponents from "../../oss/ossComponents.vue";
import toolApply from "./com_project_toolApplyCation.vue";
import { Divider } from 'element-ui';
/*組件*/
export default {
components: {
@ -490,6 +493,7 @@
technicalSpecification,
quotationHeader,
toolApply,
ElDivider: Divider,
},
name: "null",
data() {

2
src/views/modules/project/projectPart/searchProjectPart.vue

@ -133,7 +133,7 @@
</el-form-item>
</div></el-col>
<el-col :span="8"><div class="grid-content bg-purple">
<el-form-item :label="'项目责人'">
<el-form-item :label="'项目责人'">
<el-input v-model="projectData.projectOwnerName" readonly style="" ></el-input>
</el-form-item>
</div></el-col>

41
src/views/modules/tooling/searchToolApply.vue

@ -371,7 +371,7 @@
style="width: 100px; height: 80px"/></span>
</div>
<div v-if=" (item.columnProp === 'standardCost')">
<el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
<el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入数量"
style="width:98%"></el-input>
</div>
<div v-else>
@ -1060,7 +1060,8 @@
status: true,
fixed: '',
columnWidth: 70
}, {
},
{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table2QuotationNo',
@ -1620,6 +1621,12 @@
this.modelFlag=true
},
changeSum() {
if(row.standardCost<0||row.standardCost==null||row.standardCost==''){
row.standardCost=''
this.$alert('成本不能为负数或者不填', '错误', {
confirmButtonText: '确定'
})
}
this.dataForm.applySumQty = 0
this.dataForm.totalCost =0
for (const item of this.toolData) {
@ -1809,6 +1816,7 @@
},
activated() {
if (this.$route.params.type === 'tokenLogin') {
console.log("进来啦")
if (this.$route.params.docNo) {
this.searchData.applyNo = this.$route.params.docNo
}
@ -1824,6 +1832,7 @@
if(this.dataList1.length>0){
this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
this.currentRow = JSON.parse( JSON.stringify(this.dataList1[0]));
//
this.editModal(this.dataList1[0])
}else {
this.currentRow ={}
@ -1832,8 +1841,34 @@
}
this.dataListLoading = false
})
} else {
}
if (localStorage.getItem('ToolApplyData') != null) {
let data = JSON.parse(localStorage.getItem('ToolApplyData'));
if (data){
this.searchData.applyNo = data.applyNo
}
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
console.log(this.searchData)
searchProjectToolApplyHeader(this.searchData).then(({data}) => {
if (data.code == 0) {
this.dataList1 = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
if(this.dataList1.length>0){
this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
this.currentRow = JSON.parse( JSON.stringify(this.dataList1[0]));
//
this.editModalU(this.dataList1[0])
}else {
this.currentRow ={}
}
this.refreshCurrentTabTable ()
}
this.dataListLoading = false
})
}
},
}

46
src/views/modules/tooling/toolingInfo.vue

@ -14,7 +14,7 @@
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="项目责人">
<el-form-item label="项目责人">
<el-input v-model="searchData.projectOwnerName" clearable/>
</el-form-item>
</el-col>
@ -122,7 +122,9 @@
<span slot="label" style="" @click="getBaseList(103,3)"><a herf="#">采购员</a></span>
<el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
</el-form-item>
<el-form-item label=" " >
<el-checkbox v-model="jumpFlag">跳转至申请记录</el-checkbox>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'申请原因'">
@ -147,7 +149,7 @@
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column label="项目号" width="90" prop="projectId" show-overflow-tooltip/>
<el-table-column label="物料编码" width="100" prop="partNo" show-overflow-tooltip/>
<el-table-column label="工具编码" width="100" prop="toolId" show-overflow-tooltip/>
<el-table-column label="工具描述" width="120" prop="toolDescription" show-overflow-tooltip/>
<el-table-column label="工具数量" width="60" prop="toolQty" show-overflow-tooltip/>
<el-table-column label="申请数量" width="70" prop="applyQty" show-overflow-tooltip>
@ -158,11 +160,14 @@
</el-table-column>
<el-table-column label="工具成本" width="70" prop="standardCost" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
<el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入数量"
style="width:98%"></el-input>
</template>
</el-table-column>
<el-table-column label="物料名称" width="160" prop="partDesc" show-overflow-tooltip/>
<el-table-column label="物料编码" width="100" prop="partNo" show-overflow-tooltip/>
<el-table-column label="物料名称" width="160" prop="partName" show-overflow-tooltip/>
<el-table-column label="Ifs料号" width="100" prop="finalPartNo" show-overflow-tooltip/>
<el-table-column label="客户料号" width="100" prop="customerPartNo" show-overflow-tooltip/>
<el-table-column label="工艺版本" width="80" prop="routingRevision" show-overflow-tooltip/>
<el-table-column label="工艺类型" width="80" prop="routingType" show-overflow-tooltip/>
<el-table-column label="替代编码" width="80" prop="alternativeNo" show-overflow-tooltip/>
@ -492,6 +497,7 @@
columnWidth: 80
},
],
jumpFlag:true,
dataForm:{
site: '',
applyNo: '',
@ -699,15 +705,16 @@
detailList:[],
};
this.visible=true;
this.jumpFlag=true;
},
changeSum(row){
// if(row.applyQty!=null&&row.applyQty!==''&& row.toolQuantity<row.applyQty){
// row.applyQty=''
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
//
// }
if(row.standardCost<0||row.standardCost==null||row.standardCost==''){
row.standardCost=''
this.$alert('成本不能为负数或者不填', '错误', {
confirmButtonText: '确定'
})
}
this.dataForm.applySumQty =0
this.dataForm.totalCost =0
for (const item of this.toolData) {
@ -778,7 +785,7 @@
this.toolData[i].applyQty=0
}
}
this.dataForm.detailList=this.toolData.filter(item => item.applyQty > 0)
this.dataForm.detailList=this.toolData.filter(item => item.applyQty > 0).filter(item => item.standardCost > 0)
saveProjectToolApply(this.dataForm).then(({data}) => {
if (data && data.code == 0) {
this.visible=false;
@ -790,6 +797,19 @@
onClose: () => {
}
})
if(this.jumpFlag){
this.$nextTick(function () {
setTimeout(() => {
let inData = {
site: this.$store.state.user.site,
applyNo: data.applyNo,
username: this.$store.state.user.name
};
localStorage.setItem('ToolApplyData', JSON.stringify(inData))
this.$router.push('tooling-searchToolApply')
},500)
})
}
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'

Loading…
Cancel
Save