Browse Source

plm BM

master
ruanqi 1 year ago
parent
commit
5b76fd1af8
  1. 23
      src/api/tool/toolApply.js
  2. 2
      src/views/modules/project/projectInfo/com_project_technicalSpecification.vue
  3. 3
      src/views/modules/tooling/com_tool_upload_file.vue
  4. 114
      src/views/modules/tooling/searchToolApply.vue
  5. 543
      src/views/modules/tooling/toolingInfo.vue
  6. 176
      src/views/modules/tooling_old/com_tool_upload_file.vue
  7. 1099
      src/views/modules/tooling_old/searchToolApply.vue
  8. 810
      src/views/modules/tooling_old/toolingInfo.vue

23
src/api/tool/toolApply.js

@ -0,0 +1,23 @@
import { createAPI } from "@/utils/httpRequest.js";
export const projectInfoForToolApply = data => createAPI(`/plm/projectToolingApplication/projectInfoForToolApply`,'post',data)
export const getProjectPartToolForApply = data => createAPI(`/plm/projectToolingApplication/getProjectPartToolForApply`,'post',data)
export const saveProjectToolApply = data => createAPI(`/plm/projectToolingApplication/saveProjectToolApply`,'post',data)
export const searchProjectToolApplyHeader = data => createAPI(`/plm/projectToolingApplication/searchProjectToolApplyHeader`,'post',data)
export const searchProjectToolApplyDetail = data => createAPI(`/plm/projectToolingApplication/searchProjectToolApplyDetail`,'post',data)
export const comfirmProjectToolApply = data => createAPI(`/plm/projectToolingApplication/comfirmProjectToolApply`,'post',data)
export const cancelProjectToolApply = data => createAPI(`/plm/projectToolingApplication/cancelProjectToolApply`,'post',data)
export const saveProjectHeaderMessage = data => createAPI(`/plm/projectToolingApplication/saveProjectHeaderMessage`,'post',data)

2
src/views/modules/project/projectInfo/com_project_technicalSpecification.vue

@ -405,7 +405,7 @@
if (this.$router.resolve(`/sampleManagement-technicalSpecificationList`).resolved.name === '404'){
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
}else {
this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{codeNo:row.codeNo},})
this.$router.push({name:`sampleManagement-technicalSpecificationList`,params:{codeNo:row.codeNo?row.codeNo:' '},})
}
}
},

3
src/views/modules/tooling/com_tool_upload_file.vue

@ -74,7 +74,7 @@ export default {
username: this.$store.state.user.name,
projectId: '',
projectName: '',
fileType: '',
fileType: 'other',
fileRemark: '',
},
dataListLoading: false,
@ -100,6 +100,7 @@ export default {
}
//
this.pageData = JSON.parse(JSON.stringify(currentRow));
this.pageData.fileType='other'
//
this.visible = true;
//

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

@ -277,12 +277,12 @@
} from '@/api/customer/customerInformation.js'
import projectUploadFile from "./com_tool_upload_file";/*上传文件的組件*/
import Chooselist from '@/views/modules/common/Chooselist'
import {searchToolApplyHeader,
searchToolApplyDetail,
comfirmToolApply,
cancelToolApply,
saveHeaderMessage,
} from "@/api/project/toolingInfo.js"
import {searchProjectToolApplyHeader,
searchProjectToolApplyDetail,
comfirmProjectToolApply,
cancelProjectToolApply,
saveProjectHeaderMessage,
} from "@/api/tool/toolApply.js"
import {
deleteProjectFile,
getFileContentList,
@ -499,10 +499,10 @@
serialNumber: '106002Table2QuotationNo',
tableId: '106002Table2',
tableName: '工具申请明细',
columnProp: 'quotationNo',
columnProp: 'orderRef1',
headerAlign: 'center',
align: 'center',
columnLabel: '所属报价单',
columnLabel: '项目编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -517,7 +517,7 @@
serialNumber: '106002Table2ToolNo',
tableId: '106002Table2',
tableName: '工具申请明细',
columnProp: 'toolNo',
columnProp: 'toolId',
headerAlign: 'center',
align: 'center',
columnLabel: '工具编码',
@ -535,7 +535,7 @@
serialNumber: '106002Table2ToolDescription',
tableId: '106002Table2',
tableName: '工具申请明细',
columnProp: 'toolDescription',
columnProp: 'toolDesc',
headerAlign: 'center',
align: 'center',
columnLabel: '工具描述',
@ -550,31 +550,31 @@
{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table2ToolSpec',
serialNumber: '106002Table2ApplyQty',
tableId: '106002Table2',
tableName: '工具申请明细',
columnProp: 'toolSpec',
columnProp: 'applyQty',
headerAlign: 'center',
align: 'center',
columnLabel: '工具规格',
columnLabel: '申请数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table2ApplyQty',
serialNumber: '106002Table2UnitCost',
tableId: '106002Table2',
tableName: '工具申请明细',
columnProp: 'applyQty',
columnProp: 'standardCost',
headerAlign: 'center',
align: 'center',
columnLabel: '申请数量',
columnLabel: '工具成本',
columnHidden: false,
columnImage: false,
columnSortable: false,
@ -586,76 +586,108 @@
{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table2ExpectedServiceLife',
serialNumber: '106002Table2Remark',
tableId: '106002Table2',
tableName: '工具申请明细',
columnProp: 'expectedServiceLife',
columnProp: 'remark',
headerAlign: 'center',
align: 'center',
columnLabel: '预计寿命',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table2UnitCost',
serialNumber: '106002Table2QuotationNo',
tableId: '106002Table2',
tableName: '工具申请明细',
columnProp: 'unitCost',
columnProp: 'orderRef2',
headerAlign: 'center',
align: 'center',
columnLabel: '单位成本',
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
columnWidth: 70
}, {
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table2quotationUnitCost',
serialNumber: '106002Table2QuotationNo',
tableId: '106002Table2',
tableName: '工具申请明细',
columnProp: 'quotationUnitCost',
columnProp: 'orderRef3',
headerAlign: 'center',
align: 'center',
columnLabel: '单位报价成本',
columnLabel: '工艺路线版本',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
columnWidth: 70
},
{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table2Remark',
serialNumber: '106002Table2QuotationNo',
tableId: '106002Table2',
tableName: '工具申请明细',
columnProp: 'remark',
columnProp: 'orderRef5',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnLabel: '替代编码',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 200
columnWidth: 70
},{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table2QuotationNo',
tableId: '106002Table2',
tableName: '工具申请明细',
columnProp: 'operationNo',
headerAlign: 'center',
align: 'center',
columnLabel: '工序号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
},{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table2QuotationNo',
tableId: '106002Table2',
tableName: '工具申请明细',
columnProp: 'operationName',
headerAlign: 'center',
align: 'center',
columnLabel: '工序',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
},
],
columnFileContentArray: [
{
@ -807,7 +839,7 @@
search () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
searchToolApplyHeader(this.searchData).then(({data}) => {
searchProjectToolApplyHeader(this.searchData).then(({data}) => {
if (data.code == 0) {
this.dataList1 = data.page.list
this.pageIndex = data.page.currPage
@ -884,7 +916,7 @@
},
searchToolApplyDetail(){
searchToolApplyDetail(this.currentRow).then(({data}) => {
searchProjectToolApplyDetail(this.currentRow).then(({data}) => {
if (data.code == 0) {
this.detailList = data.rows
}
@ -896,7 +928,7 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
comfirmToolApply(row).then(({data}) => {
comfirmProjectToolApply(row).then(({data}) => {
if (data && data.code === 0) {
row.statusCode='10'
row.status='下达'
@ -920,7 +952,7 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cancelToolApply(row).then(({data}) => {
cancelProjectToolApply(row).then(({data}) => {
if (data && data.code === 0) {
this.search();
this.$message({
@ -1025,7 +1057,7 @@
cancelButtonText:'取消',
type:'warning'
}).then(()=>{
saveHeaderMessage(this.modelData).then(({data}) => {
saveProjectHeaderMessage(this.modelData).then(({data}) => {
if (data && data.code == 0) {
this.modelFlag=false;
this.currentRow.prNo=this.modelData.prNo

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

@ -4,86 +4,28 @@
<el-form label-position="top" :model="searchData">
<el-row :gutter="18">
<el-col :span="2">
<el-form-item label="客户编码">
<el-input v-model="searchData.customerNo" clearable />
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="客户名称">
<el-input v-model="searchData.customerName" clearable />
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="跟单员">
<el-input v-model="searchData.trackerName" clearable/>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="报价单号">
<el-input v-model="searchData.quotationNo" clearable />
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="客户询价单号">
<el-input v-model="searchData.customerInquiryNo" clearable />
<el-form-item label="项目编号">
<el-input v-model="searchData.projectId" clearable />
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="内部询价单号">
<el-input v-model="searchData.internalInquiryNo" clearable/>
<el-form-item label="项目类型">
<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-col>
</el-row>
<el-row :gutter="18">
<el-col :span="2">
<el-form-item label="项目编码">
<el-input v-model="searchData.projectId" clearable />
<el-form-item label="项目责任人">
<el-input v-model="searchData.projectOwnerName" clearable/>
</el-form-item>
</el-col>
<el-col :span="2">
<el-col :span="4">
<el-form-item label="项目名称">
<el-input v-model="searchData.projectName" clearable/>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="报价专员">
<el-input v-model="searchData.quoterName" size="large" clearable/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-row>
<el-col :span="11">
<el-form-item label="开始日期">
<el-date-picker
value-format="yyyy-MM-dd"
style="width: 100%"
v-model="searchData.startDate"
type="date"
placeholder="开始日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label=" ">
<svg t="1701739447362" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8471" id="mx_n_1701739447363" width="20" height="20"><path d="M524.288 804.864l444.416-294.912-444.416-294.912v143.36H81.92V655.36h442.368v149.504z m0 0" p-id="8472"></path></svg>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="结束日期">
<el-date-picker
value-format="yyyy-MM-dd"
style="width: 100%"
v-model="searchData.endDate"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-col>
<el-col :span="4">
<el-form-item label=" ">
<el-button plain type="primary" @click="initDataBtn" @keyup.enter.native="initDataBtn"> </el-button>
<el-button plain type="primary" @click="initDataBtn" > </el-button>
<el-button type="primary" @click="applyModel">刀模申请</el-button>
</el-form-item>
</el-col>
@ -101,116 +43,22 @@
align="center"
width="30">
</el-table-column>
<!-- <el-table-column-->
<!-- v-for="(item,index) in columnList1" :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
align="center"
prop="quotationNo"
label="报价单号"
min-width="110"
show-overflow-tooltip>
<template slot-scope="{row,$index}">
{{row.quotationNo+'-'+row.versionCode}}
v-for="(item,index) in columnList1" :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
align="center"
prop="quotationDate"
min-width="90"
label="报价日期"
show-overflow-tooltip>
</el-table-column>
<el-table-column
align="center"
prop="customerNo"
min-width="80"
show-overflow-tooltip
label="客户编码">
</el-table-column>
<el-table-column
align="left"
prop="customerName"
min-width="120"
show-overflow-tooltip
label="客户名称">
</el-table-column>
<el-table-column
align="center"
prop="projectId"
min-width="90"
show-overflow-tooltip
label="项目编码">
</el-table-column>
<el-table-column
align="left"
prop="projectName"
min-width="120"
show-overflow-tooltip
label="项目名称">
</el-table-column>
<el-table-column
align="left"
prop="quoterName"
min-width="80"
show-overflow-tooltip
label="报价专员">
</el-table-column>
<el-table-column
align="left"
prop="trackerName"
min-width="80"
show-overflow-tooltip
label="跟单员">
</el-table-column>
<el-table-column
align="left"
prop="currency"
min-width="60"
show-overflow-tooltip
label="货币">
</el-table-column>
<el-table-column
align="center"
prop="quotationStatus"
min-width="60"
show-overflow-tooltip
label="状态">
</el-table-column>
<el-table-column
align="left"
prop="remark"
show-overflow-tooltip
min-width="120"
label="备注">
</el-table-column>
<el-table-column
align="center"
prop="customerInquiryNo"
show-overflow-tooltip
min-width="80"
label="客户询价单号">
</el-table-column>
<el-table-column
align="center"
prop="internalInquiryNo"
show-overflow-tooltip
min-width="80"
label="内部询价单号">
</el-table-column>
<!-- <el-table-column-->
<!-- header-align="center"-->
<!-- align="center"-->
@ -275,21 +123,26 @@
ref="toolTable"
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column label="报价单号" width="90" prop="quotationNo" show-overflow-tooltip/>
<el-table-column label="产品编码" width="150" prop="productNo" show-overflow-tooltip/>
<el-table-column label="工具编码" width="90" prop="toolNo" show-overflow-tooltip/>
<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="120" prop="toolDescription" show-overflow-tooltip/>
<el-table-column label="工具数量" width="60" prop="toolQuantity" 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>
<template slot-scope="scope">
<el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
style="width:98%"></el-input>
</template>
</el-table-column>
<el-table-column label="产品名称" width="120" prop="productDesc" show-overflow-tooltip/>
<el-table-column label="工具成本" width="60" prop="unitCost" show-overflow-tooltip/>
<el-table-column label="单位报价成本" width="90" prop="quotationUnitCost" show-overflow-tooltip/>
<el-table-column label="预计使用寿命" width="90" prop="expectedServiceLife" show-overflow-tooltip/>
<el-table-column label="物料名称" width="160" prop="partDesc" 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/>
<el-table-column label="替代名称" width="80" prop="alternativeDescription" show-overflow-tooltip/>
<el-table-column label="工序号" width="60" prop="operationNo" show-overflow-tooltip/>
<el-table-column label="工序名称" width="80" prop="operationName" show-overflow-tooltip/>
<el-table-column label="工具成本" width="60" prop="standardCost" show-overflow-tooltip/>
<!-- <el-table-column label="单位报价成本" width="90" prop="quotationUnitCost" show-overflow-tooltip/>-->
<!-- <el-table-column label="预计使用寿命" width="90" prop="expectedServiceLife" show-overflow-tooltip/>-->
</el-table>
</div>
<span slot="footer" class="dialog-footer">
@ -302,15 +155,15 @@
</template>
<script>
import {
getQuotationHeaderForToolingInfo,
getQuotationToolForApply,
saveToolApply,
} from "@/api/project/toolingInfo.js"
import {projectInfoForToolApply,
getProjectPartToolForApply,
saveProjectToolApply,
} from "@/api/tool/toolApply.js"
import Chooselist from '@/views/modules/common/Chooselist'
import DictDataSelect from "@/views/modules/sys/dict-data-select";
export default {
components: {
Chooselist
Chooselist, DictDataSelect,
},
data() {
return {
@ -319,17 +172,14 @@
searchFlag:false,
//
searchData:{
site:this.$store.state.user.site,//
customerNo:"", //
customer:"", //
tracker:"", //
quotationStatus:"", //
projectId:"", //
projectName:"", //
quoterName:"", //
startDate:"", //
endDate:"", //
dateValue:[],//
page: 1,
limit: 100,
site:this.$store.state.user.site,
projectId:'',
projectType:'',
projectOwnerName:'',
projectName:'',
userName:this.$store.state.user.name,
},
exportList:[],
pageIndex: 1,
@ -338,149 +188,211 @@
visible:false,
dataListLoading: false,
currentRow:'',
columnList1:[
columnList1: [
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4TestPartNo',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "testPartNo",
functionId: 106001001,
serialNumber: '106001001Table1ProjectId',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "projectId",
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: 106001001,
serialNumber: '106001001Table1ProjectType',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "projectType",
headerAlign: "center",
align: "left",
columnLabel: "物料编码",
columnLabel: "项目类型",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},{
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4PartType',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "partType",
functionId: 106001001,
serialNumber: '106001001Table1ProjectName',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "projectName",
headerAlign: "center",
align: "left",
columnLabel: "物料分类",
columnLabel: "项目名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},{
columnWidth: 200
},
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4PartTypeDesc',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "partTypeDesc",
functionId: 106001001,
serialNumber: '106001001Table1Status',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "status",
headerAlign: "center",
align: "left",
columnLabel: "物料分类名称",
columnLabel: "项目状态",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},{
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4PartName',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "partName",
functionId: 106001001,
serialNumber: '106001001Table1Priority',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "priorityDesc",
headerAlign: "center",
align: "left",
columnLabel: "物料名称",
columnLabel: "优先级",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4PartDesc',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "partDesc",
functionId: 106001001,
serialNumber: '106001001Table1BuNo',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "buNo",
headerAlign: "center",
align: "left",
columnLabel: "物料描述",
columnLabel: "BU编码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4PartSpec',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "partSpec",
functionId: 106001001,
serialNumber: '106001001Table1BuDesc',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "buDesc",
headerAlign: "center",
align: "left",
columnLabel: "规格型号",
columnLabel: "BU名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4MaterialNumber',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "materialNumber",
functionId: 106001001,
serialNumber: '106001001Table1ProjectOwnerName',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "projectOwnerName",
headerAlign: "center",
align: "left",
columnLabel: "物料图号",
columnLabel: "项目负责人",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4Remark',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "remark",
functionId: 106001001,
serialNumber: '106001001Table1ProjectSource',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "projectSourceDesc",
headerAlign: "center",
align: "left",
columnLabel: "备注",
columnLabel: "项目来源",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},{
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 106001001,
serialNumber: '106001001Table1CustomerId',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "customerId",
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: 106001001,
serialNumber: '106001001Table1CustomerName',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "customerName",
headerAlign: "center",
align: "left",
columnLabel: "客户名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 150
},
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4CreateDate',
tableId: "106001Table4",
tableName: "项目物料",
functionId: 106001001,
serialNumber: '106001001Table1CreateDate',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "createDate",
headerAlign: "center",
align: "left",
@ -491,13 +403,14 @@
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},{
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4CreateBy',
tableId: "106001Table4",
tableName: "项目物料",
functionId: 106001001,
serialNumber: '106001001Table1CreateBy',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "createBy",
headerAlign: "center",
align: "left",
@ -509,29 +422,31 @@
status: true,
fixed: '',
columnWidth: 80
},{
},
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4UpdateDate',
tableId: "106001Table4",
tableName: "项目物料",
functionId: 106001001,
serialNumber: '106001001Table1UpdateDate',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "updateDate",
headerAlign: "center",
align: "left",
columnLabel: "上次修改日期",
columnLabel: "修改时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},{
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4UpdateBy',
tableId: "106001Table4",
tableName: "项目物料",
functionId: 106001001,
serialNumber: '106001001Table1UpdateBy',
tableId: "106001001Table1",
tableName: "项目信息主表",
columnProp: "updateBy",
headerAlign: "center",
align: "left",
@ -584,7 +499,7 @@
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 230;
this.height = window.innerHeight - 190;
})
},
methods: {
@ -626,53 +541,23 @@
this.search()
},
initDataBtn(){
this.$route.params.ids = null;
this.initData();
},
//
initData(){
let ids = ""
if (this.$route.params.ids){
ids = "?"
for (let i = 0; i < this.$route.params.ids.length; i++) {
ids+='ids='+this.$route.params.ids[i]+'&'
}
ids = ids.substring(0,ids.length-1);
}
let params = {
no:this.no,
size:this.size,
site:this.$store.state.user.site,
customerNo:this.searchData.customerNo,
customerName:this.searchData.customerName,
trackerName:this.searchData.trackerName,
quotationNo:this.searchData.quotationNo,
customerInquiryNo:this.searchData.customerInquiryNo,
internalInquiryNo:this.searchData.internalInquiryNo,
quotationStatus:this.searchData.quotationStatus,
projectId:this.searchData.projectId,
projectName:this.searchData.projectName,
quoterName:this.searchData.quoterName,
startDate:this.searchData.startDate,
endDate: this.searchData.endDate,
}
this.init(params,ids)
},
init(params,ids){
this.initQuotationHeaderLoading = true;
getQuotationHeaderForToolingInfo(params,ids).then(({data})=>{
this.dataList = data.data.records;
this.total = data.data.total;
if (this.tableData.length > 0){
this.quotationHeader = this.tableData[0];
}else {
this.quotationHeader = null;
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
projectInfoForToolApply(this.searchData).then(({data}) => {
if (data.code == 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
}
this.initQuotationHeaderLoading = false;
}).catch((error)=>{
this.initQuotationHeaderLoading = false;
this.dataListLoading = false
})
},
applyModel() {
if(this.dataListSelections.length===0){
this.$alert('请选择报价单!', '错误', {
@ -680,7 +565,7 @@
})
return false;
}
getQuotationToolForApply(this.dataListSelections).then(({data}) => {
getProjectPartToolForApply(this.dataListSelections).then(({data}) => {
if (data.code == 0) {
this.toolData=data.rows
}
@ -749,8 +634,8 @@
this.toolData[i].applyQty=0
}
}
this.dataForm.detailList=JSON.parse(JSON.stringify(this.toolData))
saveToolApply(this.dataForm).then(({data}) => {
this.dataForm.detailList=this.toolData.filter(item => item.applyQty > 0)
saveProjectToolApply(this.dataForm).then(({data}) => {
if (data && data.code == 0) {
this.visible=false;
this.initDataBtn();

176
src/views/modules/tooling_old/com_tool_upload_file.vue

@ -0,0 +1,176 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" width="400px" style="" class="customer-dialog">
<el-form :inline="true" label-position="top" label-width="80px" :rules="dataRole">
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" label="申请单编码:" >
<el-input v-model="pageData.projectId" style="width: 120px;" disabled ></el-input>
</el-form-item>
</el-col>
<!-- <el-col :span="12">-->
<!-- <el-form-item class="customer-item" label="项目名称:">-->
<!-- <el-input v-model="pageData.projectName" style="width: 120px;" disabled></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="12" style="width: 32%">
<el-form-item class="customer-item" label="文件类型:" prop="fileType" :role="dataRole.fileType">
<el-select v-model="pageData.fileType" style="width: 110px">
<el-option label="sop" value="sop"></el-option>
<el-option label="other" value="other"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-upload class="customer-upload"
drag
action="javascript:void(0);" ref="uploadFile" :limit="1"
:before-upload="beforeUploadHandle" :on-change="onChange"
accept="*" :auto-upload="false"
style="text-align: left;">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
</el-upload>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="margin-bottom: 30px;">
<el-form-item class="customer-item" label="备注:" >
<el-input type="textarea" style="width: 360px;" placeholder="请输入内容" v-model="pageData.fileRemark"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveUploadFile()">保存</el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
uploadProjectFile,
} from "@/api/project/project.js"
/* 引入组件 */
var functionId = 'C10000002';
export default {
data() {
return {
titleCon: '项目文件上传',
folder: 'eamObject',
visible: false,
userId: this.$store.state.user.name,
fileList: [],
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
projectId: '',
projectName: '',
fileType: '',
fileRemark: '',
},
dataListLoading: false,
dataRole: {
fileType: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
},
}
},
methods: {
//
init(currentRow) {
if(currentRow.projectId==null||currentRow.projectId==''){
this.$alert('请选择申请单!', '错误', {
confirmButtonText: '确定'
})
return false;
}
//
this.pageData = JSON.parse(JSON.stringify(currentRow));
//
this.visible = true;
//
this.pageData.username = this.userId;
//
//this.titleCon = this.labels.titleCon;
},
//
beforeUploadHandle(file) {
// if (file.type !== 'image/jpg' && file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/gif' && file.type !== 'application/pdf') {
// this.$message.error('PDF')
// return false
// }
this.num++
},
/*选择上传文件时*/
onChange(file){
this.fileList.push(file);
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageTables');
//
this.visible = false;
},
/*保修当前的数据*/
saveUploadFile(){
let remark = this.pageData.fileRemark;
if(this.pageData.fileType === '' || this.pageData.fileType == null){
this.$message.warning("请选择文件类型!");
return false;
}
/*判断文件是否上传*/
if(null == this.fileList || 0 == this.fileList.length){
this.$message.error("请先上传文件!");
return false;
}
const formData = new FormData();
//
formData.append("file", this.fileList[0].raw);
formData.append("folder", this.folder);
formData.append("site", this.pageData.site);
formData.append("projectId", this.pageData.projectId);
formData.append("orderRef3", this.pageData.fileType);
formData.append("remark", remark);
uploadProjectFile(formData).then(({data}) => {
if (data.code === 0) {
this.$message.success(data.msg);
//
this.$refs.uploadFile.clearFiles();
this.pageData.fileRemark = '';
}else {
this.$message.warning(data.msg);
}
})
}
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
</style>

1099
src/views/modules/tooling_old/searchToolApply.vue
File diff suppressed because it is too large
View File

810
src/views/modules/tooling_old/toolingInfo.vue

@ -0,0 +1,810 @@
<template>
<div class="mod-config">
<!-- 工具申请界面-->
<el-form label-position="top" :model="searchData">
<el-row :gutter="18">
<el-col :span="2">
<el-form-item label="客户编码">
<el-input v-model="searchData.customerNo" clearable />
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="客户名称">
<el-input v-model="searchData.customerName" clearable />
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="跟单员">
<el-input v-model="searchData.trackerName" clearable/>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="报价单号">
<el-input v-model="searchData.quotationNo" clearable />
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="客户询价单号">
<el-input v-model="searchData.customerInquiryNo" clearable />
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="内部询价单号">
<el-input v-model="searchData.internalInquiryNo" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="18">
<el-col :span="2">
<el-form-item label="项目编码">
<el-input v-model="searchData.projectId" clearable />
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="项目名称">
<el-input v-model="searchData.projectName" clearable/>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="报价专员">
<el-input v-model="searchData.quoterName" size="large" clearable/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-row>
<el-col :span="11">
<el-form-item label="开始日期">
<el-date-picker
value-format="yyyy-MM-dd"
style="width: 100%"
v-model="searchData.startDate"
type="date"
placeholder="开始日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label=" ">
<svg t="1701739447362" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8471" id="mx_n_1701739447363" width="20" height="20"><path d="M524.288 804.864l444.416-294.912-444.416-294.912v143.36H81.92V655.36h442.368v149.504z m0 0" p-id="8472"></path></svg>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="结束日期">
<el-date-picker
value-format="yyyy-MM-dd"
style="width: 100%"
v-model="searchData.endDate"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-col>
<el-col :span="4">
<el-form-item label=" ">
<el-button plain type="primary" @click="initDataBtn" @keyup.enter.native="initDataBtn"> </el-button>
<el-button type="primary" @click="applyModel">刀模申请</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data="dataList"
:height="height"
border
@selection-change="selectionChangeHandle"
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
type="selection"
align="center"
width="30">
</el-table-column>
<!-- <el-table-column-->
<!-- v-for="(item,index) in columnList1" :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
align="center"
prop="quotationNo"
label="报价单号"
min-width="110"
show-overflow-tooltip>
<template slot-scope="{row,$index}">
{{row.quotationNo+'-'+row.versionCode}}
</template>
</el-table-column>
<el-table-column
align="center"
prop="quotationDate"
min-width="90"
label="报价日期"
show-overflow-tooltip>
</el-table-column>
<el-table-column
align="center"
prop="customerNo"
min-width="80"
show-overflow-tooltip
label="客户编码">
</el-table-column>
<el-table-column
align="left"
prop="customerName"
min-width="120"
show-overflow-tooltip
label="客户名称">
</el-table-column>
<el-table-column
align="center"
prop="projectId"
min-width="90"
show-overflow-tooltip
label="项目编码">
</el-table-column>
<el-table-column
align="left"
prop="projectName"
min-width="120"
show-overflow-tooltip
label="项目名称">
</el-table-column>
<el-table-column
align="left"
prop="quoterName"
min-width="80"
show-overflow-tooltip
label="报价专员">
</el-table-column>
<el-table-column
align="left"
prop="trackerName"
min-width="80"
show-overflow-tooltip
label="跟单员">
</el-table-column>
<el-table-column
align="left"
prop="currency"
min-width="60"
show-overflow-tooltip
label="货币">
</el-table-column>
<el-table-column
align="center"
prop="quotationStatus"
min-width="60"
show-overflow-tooltip
label="状态">
</el-table-column>
<el-table-column
align="left"
prop="remark"
show-overflow-tooltip
min-width="120"
label="备注">
</el-table-column>
<el-table-column
align="center"
prop="customerInquiryNo"
show-overflow-tooltip
min-width="80"
label="客户询价单号">
</el-table-column>
<el-table-column
align="center"
prop="internalInquiryNo"
show-overflow-tooltip
min-width="80"
label="内部询价单号">
</el-table-column>
<!-- <el-table-column-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="150"-->
<!-- fixed="right"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <a type="text" size="small" @click="updateModel(scope.row)">修改</a>-->
<!-- <a type="text" size="small" @click="deleteData(scope.row)">删除</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 1000]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-dialog
width="800px" v-drag
:title="'刀模申请'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'申请编号'">
<el-input v-model="dataForm.applyNo" style="width: 130px" disabled></el-input>
</el-form-item>
<el-form-item :label="'申请人'" required="required">
<el-input v-model="dataForm.applyBy" style="width: 130px" ></el-input>
</el-form-item>
<el-form-item :label="'申请日期'" required="required">
<el-date-picker
value-format="yyyy-MM-dd"
style="width: 100%"
v-model="dataForm.applyDate"
type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item :label="'申请总数'">
<el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'申请原因'">
<el-input v-model="dataForm.applyReason" style="width: 770px" ></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px" >
<el-form-item :label="'备注'">
<el-input v-model="dataForm.remark" style="width: 770px" ></el-input>
</el-form-item>
</el-form>
<div class="rq">
<el-table
height="250"
:data="toolData"
border
ref="toolTable"
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column label="报价单号" width="90" prop="quotationNo" show-overflow-tooltip/>
<el-table-column label="产品编码" width="150" prop="productNo" show-overflow-tooltip/>
<el-table-column label="工具编码" width="90" prop="toolNo" show-overflow-tooltip/>
<el-table-column label="工具描述" width="120" prop="toolDescription" show-overflow-tooltip/>
<el-table-column label="工具数量" width="60" prop="toolQuantity" show-overflow-tooltip/>
<el-table-column label="申请数量" width="70" prop="applyQty" show-overflow-tooltip>
<template slot-scope="scope">
<el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
style="width:98%"></el-input>
</template>
</el-table-column>
<el-table-column label="产品名称" width="120" prop="productDesc" show-overflow-tooltip/>
<el-table-column label="工具成本" width="60" prop="unitCost" show-overflow-tooltip/>
<el-table-column label="单位报价成本" width="90" prop="quotationUnitCost" show-overflow-tooltip/>
<el-table-column label="预计使用寿命" width="90" prop="expectedServiceLife" show-overflow-tooltip/>
</el-table>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveData()">{{'保存'}}</el-button>
<el-button type="primary" @click="visible = false">{{'取消'}}</el-button>
</span>
</el-dialog>
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
getQuotationHeaderForToolingInfo,
getQuotationToolForApply,
saveToolApply,
} from "@/api/project/toolingInfo.js"
import Chooselist from '@/views/modules/common/Chooselist'
export default {
components: {
Chooselist
},
data() {
return {
height: 200,
dataList: [],
searchFlag:false,
//
searchData:{
site:this.$store.state.user.site,//
customerNo:"", //
customer:"", //
tracker:"", //
quotationStatus:"", //
projectId:"", //
projectName:"", //
quoterName:"", //
startDate:"", //
endDate:"", //
dateValue:[],//
},
exportList:[],
pageIndex: 1,
pageSize: 100,
totalPage: 0,
visible:false,
dataListLoading: false,
currentRow:'',
columnList1:[
{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4TestPartNo',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "testPartNo",
headerAlign: "center",
align: "left",
columnLabel: "物料编码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4PartType',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "partType",
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: 106001,
serialNumber: '106001Table4PartTypeDesc',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "partTypeDesc",
headerAlign: "center",
align: "left",
columnLabel: "物料分类名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4PartName',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "partName",
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: 106001,
serialNumber: '106001Table4PartDesc',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "partDesc",
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: 106001,
serialNumber: '106001Table4PartSpec',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "partSpec",
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: 106001,
serialNumber: '106001Table4MaterialNumber',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "materialNumber",
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: 106001,
serialNumber: '106001Table4Remark',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "remark",
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: 106001,
serialNumber: '106001Table4CreateDate',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "createDate",
headerAlign: "center",
align: "left",
columnLabel: "创建时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4CreateBy',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "createBy",
headerAlign: "center",
align: "left",
columnLabel: "创建人",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4UpdateDate',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "updateDate",
headerAlign: "center",
align: "left",
columnLabel: "上次修改日期",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},{
userId: this.$store.state.user.name,
functionId: 106001,
serialNumber: '106001Table4UpdateBy',
tableId: "106001Table4",
tableName: "项目物料",
columnProp: "updateBy",
headerAlign: "center",
align: "left",
columnLabel: "修改人",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
],
dataForm:{
site: '',
applyNo: '',
applyBy:'',
applyDate:'',
applySumQty:'',
applyReason:'',
remark:'',
createBy:'',
detailList:[],
},
toolData:[],
dataListSelections:[],
dataRole: {
partTypeDesc: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
partName: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
},
// start
exportData: [],
exportName: '项目物料'+this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["项目物料"],
exportFooter: [],
// end
}
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 230;
})
},
methods: {
// S
getBaseList (val, type) {
this.tagNo = val
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
if (val === 1013) {
if(type==1) {
strVal = this.dataForm.partType
}
}
this.$refs.baseList.init(val, strVal)
})
},
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 1013) {
if(this.tagNo1==1) {
this.dataForm.partType = val.Base_id
this.dataForm.partTypeDesc = val.Base_desc
}
}
},
selectionChangeHandle (val) {
this.dataListSelections = val
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.search()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.search()
},
initDataBtn(){
this.$route.params.ids = null;
this.initData();
},
//
initData(){
let ids = ""
if (this.$route.params.ids){
ids = "?"
for (let i = 0; i < this.$route.params.ids.length; i++) {
ids+='ids='+this.$route.params.ids[i]+'&'
}
ids = ids.substring(0,ids.length-1);
}
let params = {
no:this.no,
size:this.size,
site:this.$store.state.user.site,
customerNo:this.searchData.customerNo,
customerName:this.searchData.customerName,
trackerName:this.searchData.trackerName,
quotationNo:this.searchData.quotationNo,
customerInquiryNo:this.searchData.customerInquiryNo,
internalInquiryNo:this.searchData.internalInquiryNo,
quotationStatus:this.searchData.quotationStatus,
projectId:this.searchData.projectId,
projectName:this.searchData.projectName,
quoterName:this.searchData.quoterName,
startDate:this.searchData.startDate,
endDate: this.searchData.endDate,
}
this.init(params,ids)
},
init(params,ids){
this.initQuotationHeaderLoading = true;
getQuotationHeaderForToolingInfo(params,ids).then(({data})=>{
this.dataList = data.data.records;
this.total = data.data.total;
if (this.tableData.length > 0){
this.quotationHeader = this.tableData[0];
}else {
this.quotationHeader = null;
}
this.initQuotationHeaderLoading = false;
}).catch((error)=>{
this.initQuotationHeaderLoading = false;
})
},
applyModel() {
if(this.dataListSelections.length===0){
this.$alert('请选择报价单!', '错误', {
confirmButtonText: '确定'
})
return false;
}
getQuotationToolForApply(this.dataListSelections).then(({data}) => {
if (data.code == 0) {
this.toolData=data.rows
}
})
this.dataForm={
site: this.$store.state.user.site,
applyNo: '',
applyBy:this.$store.state.user.name,
applyDate:new Date(),
applySumQty:0,
applyReason:'',
remark:'',
createBy:this.$store.state.user.name,
detailList:[],
};
this.visible=true;
},
changeSum(row){
// if(row.applyQty!=null&&row.applyQty!==''&& row.toolQuantity<row.applyQty){
// row.applyQty=''
// this.$alert(data.msg, '', {
// confirmButtonText: ''
// })
//
// }
this.dataForm.applySumQty =0
for (const item of this.toolData) {
// null undefined 0
this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0);
}
},
saveData(){
// for (let i = 0; i < this.toolData.length; i++) {
// if(this.toolData[i].toolQuantity<this.toolData[i].applyQty){
// this.$alert( ''+this.toolData[i].toolNo +' ', '', {
// confirmButtonText: ''
// })
// return false;
// }
// }
if(this.dataForm.applySumQty===0){
this.$alert('未填写申请数量!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.dataForm.applyBy===''||this.dataForm.applyBy==null){
this.$alert('未选择申请人!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.dataForm.applyDate===''||this.dataForm.applyDate==null){
this.$alert('未选择申请日期!', '错误', {
confirmButtonText: '确定'
})
return false;
}
this.$confirm('确定要保存?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
for (let i = 0; i < this.toolData.length; i++) {
if (this.toolData[i].applyQty===''||this.toolData[i].applyQty==null){
this.toolData[i].applyQty=0
}
}
this.dataForm.detailList=JSON.parse(JSON.stringify(this.toolData))
saveToolApply(this.dataForm).then(({data}) => {
if (data && data.code == 0) {
this.visible=false;
this.initDataBtn();
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
//excel
//excel
async createExportData() {
// this.searchData.limit = -1
// this.searchData.page = 1
// await projectInfoSearch(this.searchData).then(({data}) => {
// this.exportList= data.page.list;
// })
//
// return this.exportList;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
fields() {
let json = "{"
this.columnList1.forEach((item, index) => {
if (index == this.columnList1.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
},
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save