机床查询、使用滞货

This commit is contained in:
liushuai
2019-01-21 09:37:51 +08:00
parent 969a1bc8d6
commit bce18ed9cd
17 changed files with 373 additions and 514 deletions

View File

@@ -11,18 +11,6 @@ export function initProject() {
}
})
}
// 机床查询
export function searchMachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_机床_查询数据',
param: '项目流水号=' + num
}
})
}
// 查询组件工艺
export function searchDetail(num) {
return request({

View File

@@ -11,27 +11,15 @@ export function initProject() {
}
})
}
// 机床查询
export function searchmachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_计划下达_机床_查询数据',
param: '项目流水号=' + num
}
})
}
// 主表查询
export function searchTable(check, projectValue, check1, machineNumberValue, check2, time, time1, pageCurrent, pageSize) {
export function searchTable(check1, machineNumberValue, check2, time, time1, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_计划信息_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + projectValue + '&机床流水号_check=' + check1 + '=int&机床流水号=' + machineNumberValue + '&计划完成日期_check=' + check2 + '=int&开始时间=' + time + '&结束时间=' + time1,
param: '机床流水号_check=' + check1 + '=int&机床流水号=' + machineNumberValue + '&计划完成日期_check=' + check2 + '=int&开始时间=' + time + '&结束时间=' + time1,
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -11,18 +11,6 @@ export function initProject() {
}
})
}
// 机床查询
export function searchmachine(num, check) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + num
}
})
}
export function initPerson() {
return request({
url: '',
@@ -35,14 +23,14 @@ export function initPerson() {
})
}
// 主表查询
export function searchTable(check, projectValue, check1, machineNumberValue, pageCurrent, pageSize) {
export function searchTable(check1, machineNumberValue, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_工艺任务_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + projectValue + '&机床流水号_check=' + check1 + '=int&机床流水号=' + machineNumberValue,
param: '机床流水号_check=' + check1 + '=int&机床流水号=' + machineNumberValue,
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -11,18 +11,6 @@ export function initProject() {
}
})
}
// 机床查询
export function searchMachine(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_机床_查询数据',
param: '项目流水号=' + num
}
})
}
// 查询组件工艺
export function searchDetail(num) {
return request({
@@ -48,14 +36,14 @@ export function searchProcess(num) {
})
}
// 主表查询
export function searchTable(check, projectValue, check1, machineNumberValue, pageCurrent, pageSize) {
export function searchTable(check1, machineNumberValue, pageCurrent, pageSize) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间装配管理_项目打印_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + projectValue + '&机床流水号_check=' + check1 + '=int&机床流水号=' + machineNumberValue,
param: '机床流水号_check=' + check1 + '=int&机床流水号=' + machineNumberValue,
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -1,6 +1,6 @@
import request from '@/utils/request'
// 初始化项目
// 初始化机床项目
export function initProject() {
return request({
url: '',
@@ -11,18 +11,6 @@ export function initProject() {
}
})
}
// 机床查询
export function searchmachine(num, check) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据',
param: '项目流水号_check=' + check + '=int&项目流水号=' + num
}
})
}
// 组件查询
export function searchgroup(num) {
return request({
@@ -35,14 +23,14 @@ export function searchgroup(num) {
}
})
}
export function searchTable(projectValue, check1, machineNumberValue, check2, groupNumberValue, check3) {
export function searchTable(machineNumberValue, check2, groupNumberValue, check3) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间管理_基本件采购_查询数据',
param: '项目流水号_check=' + check1 + '&项目流水号=' + projectValue + '&机床流水号_check=' + check2 + '&机床流水号=' + machineNumberValue + '&组件流水号_check=' + check3 + '&组件流水号=' + groupNumberValue
param: '机床流水号_check=' + check2 + '&机床流水号=' + machineNumberValue + '&组件流水号_check=' + check3 + '&组件流水号=' + groupNumberValue
}
})
}
@@ -79,25 +67,25 @@ export function searchTable1(PurchaseOrder, check4) {
}
})
}
export function addData(num, num1, num2, id, time) {
export function addData(num1, num2, id, time) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间管理_基本件采购_请购单_增加数据',
param: '请购单编号=' + num + '&请购车间=' + num1 + '&请购人=' + num2 + '&人员编号=' + id + '&请购时间=' + time
param: '请购车间=' + num1 + '&请购人=' + num2 + '&人员编号=' + id + '&请购时间=' + time
}
})
}
export function editData(RequisitionList, num, num1, time) {
export function editData(RequisitionList, num1, time) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间管理_基本件采购_请购单_编辑数据',
param: '请购单流水号=' + RequisitionList + '&请购单编号=' + num + '&请购车间=' + num1 + '&请购时间=' + time
param: '请购单流水号=' + RequisitionList + '&请购车间=' + num1 + '&请购时间=' + time
}
})
}
@@ -145,14 +133,14 @@ export function purchaseRequisition(RequisitionList, projectName, projectFloatVa
}
})
}
export function purchaseRequisition1(RequisitionList, projectName, projectFloatValue, MachineToolNumber, machineFloatValue, groupName, groupFloatValue, StandardPartsAndOutsourcing, MaterialName, MaterialSpecification, MaterialModel, NumberOfParts, PartType, time, MaterialNum, ReMarks) {
export function purchaseRequisition1(RequisitionList, projectName, projectFloatValue, MachineToolNumber, machineFloatValue, groupName, groupFloatValue, StandardPartsAndOutsourcing, MaterialName, MaterialCode, MaterialSpecification, MaterialModel, NumberOfParts, PartType, time, MaterialNum, ReMarks) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间管理_基本件采购_请购单明细_请购',
param: '请购单流水号=' + RequisitionList + '&项目名称=' + projectName + '&项目流水号=' + projectFloatValue + '&机床图号=' + MachineToolNumber + '&机床流水号=' + machineFloatValue + '&组号=' + groupName + '&组件流水号=' + groupFloatValue + '&标准件和外购件流水号=' + StandardPartsAndOutsourcing + '&物料名称=' + MaterialName + '&物料规格=' + MaterialSpecification + '&物料型号=' + MaterialModel + '&零件数量=' + NumberOfParts + '&零件类型=' + PartType + '&物料计划到货时间=' + time + '&物料流水号=' + MaterialNum + '&备注=' + ReMarks
param: '请购单流水号=' + RequisitionList + '&项目名称=' + projectName + '&项目流水号=' + projectFloatValue + '&机床图号=' + MachineToolNumber + '&机床流水号=' + machineFloatValue + '&组号=' + groupName + '&组件流水号=' + groupFloatValue + '&标准件和外购件流水号=' + StandardPartsAndOutsourcing + '&物料名称=' + MaterialName + '&物料代码=' + MaterialCode + '&物料规格=' + MaterialSpecification + '&物料型号=' + MaterialModel + '&零件数量=' + NumberOfParts + '&零件类型=' + PartType + '&物料计划到货时间=' + time + '&物料流水号=' + MaterialNum + '&备注=' + ReMarks
}
})
}
@@ -275,3 +263,25 @@ export function Delete1(num) {
}
})
}
export function editStock(num, num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '零件分配_标准件和外购件_使用库存',
param: '标准件和外购件流水号=' + num + '&数量=' + num1 + '&零件数量=' + num2
}
})
}
export function editNum(num, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间管理_标准件和外购件_更改数量',
param: '请购单明细流水号=' + num + '&数量=' + num1
}
})
}

View File

@@ -79,14 +79,14 @@ export function searchSupplier(check1, value1, check2, value2, check3, value3, c
})
}
// 生成采购合同
export function doneContract(num1, RequisitionNumber, name1, time1, time2, num2, text, freight, num3, partsNum, priceGroup, taxGroup, currency, num4, id, AdvanceCharge) {
export function doneContract(num1, RequisitionNumber, name1, time1, time2, num2, text, freight, num3, partsNum, priceGroup, taxGroup, currency, num4, id, singleQuota, readyQuota, AdvanceCharge) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间管理_基本件采购_请购单和请购单明细_增加数据',
param: `请购单流水号=${num1}&请购单编号=${RequisitionNumber}&采购合同名称=${name1}&预到货时间=${time1}&规定到货时间=${time2}&采购员=${id}&供应商流水号=${num2}&合同文本=${text}&运费=${freight}&物料流水号组=${num3}&请购单明细流水号组=${num4}&数量组=${partsNum}&单价组=${priceGroup}&税率组=${taxGroup}&币种流水号组=${currency}&预付款=${AdvanceCharge}`
param: `请购单流水号=${num1}&请购单编号=${RequisitionNumber}&采购合同名称=${name1}&预到货时间=${time1}&规定到货时间=${time2}&采购员=${id}&供应商流水号=${num2}&合同文本=${text}&运费=${freight}&物料流水号组=${num3}&请购单明细流水号组=${num4}&数量组=${partsNum}&单价组=${priceGroup}&税率组=${taxGroup}&币种流水号组=${currency}&单件定额工时组=${singleQuota}&准结定额工时组=${readyQuota}&预付款=${AdvanceCharge}`
}
})
}

View File

@@ -20,7 +20,7 @@ const service = axios.create({
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.1.212:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
// baseURL: `http://localhost:8077/submit/MESCommonBase.ashx`,
// baseURL: `http://192.168.0.112:8411/submit/MESCommonBase.ashx`,
timeout: 1500000 // 请求超时时间

View File

@@ -2,21 +2,16 @@
<div class="app-container">
<el-card style="margin-bottom: 20px">
<el-row>
<span>项目名称:</span>
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="searchMachine">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" filterable clearable>
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="searchDetail()">查询</el-button>
</el-row>
@@ -144,13 +139,11 @@
</template>
<script>
import { initProject, searchMachine, searchDetail, searchProcess, update, getTree, fn, getTable8 } from '@/api/Assembly/AssemblyInformationInput'
import { initProject, searchDetail, searchProcess, update, getTree, fn, getTable8 } from '@/api/Assembly/AssemblyInformationInput'
export default {
data() {
return {
projectValue: '',
project: [],
machineNumberValue: '',
machineNumber: [],
floatNum: '',
@@ -177,23 +170,19 @@ export default {
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
getTree().then(response => { // 获取人员信息树
const data = response.data
this.data2 = fn(data, 0)
})
},
searchMachine() { // 根据条件查机床编号
this.machineNumberValue = ''
this.machineNumber = []
searchMachine(this.projectValue).then(response => {
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
value: response.data[i].机床流水号,
name: response.data[i].项目名称
})
}
})
getTree().then(response => { // 获取人员信息树
const data = response.data
this.data2 = fn(data, 0)
})
},
async searchDetail() { // 主表查询
this.dataAll = []

View File

@@ -1,21 +1,16 @@
<template>
<div class="app-container">
<el-card>
<span>项目名称:</span>
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>计划完成日期:</span>
<el-date-picker
@@ -86,7 +81,7 @@
</template>
<script>
import { initProject, searchmachine, searchTable, goDown } from '@/api/Assembly/AssemblyPlan'
import { initProject, searchTable, goDown } from '@/api/Assembly/AssemblyPlan'
export default {
data() {
return {
@@ -119,16 +114,12 @@ export default {
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
projectChange() {
this.machineNumberValue = ''
this.machineNumber = []
searchmachine(this.projectValue).then(response => {
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
value: response.data[i].机床流水号,
name: response.data[i].项目名称
})
}
})
@@ -140,9 +131,8 @@ export default {
this.check2 = 0
this.startEndDate = ''
} else { this.check2 = 1 }
this.projectValue ? this.check = 1 : this.check = 0
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.check2, this.startEndDate[0], this.startEndDate[1], this.pageCurrent, this.pageSize).then(response => {
searchTable(this.check1, this.machineNumberValue, this.check2, this.startEndDate[0], this.startEndDate[1], this.pageCurrent, this.pageSize).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
console.log(response.data.rows[i].发货节点)
if (response.data.rows[i].发货节点 !== '') {

View File

@@ -2,21 +2,16 @@
<div class="app-container">
<el-card>
<el-row>
<span>项目名称:</span>
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total=0;pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="Preservation()">保存</el-button>
@@ -118,12 +113,10 @@
</template>
<script>
import { initProject, searchmachine, initPerson, searchTable, Preservation } from '@/api/Assembly/AssemblyProcessAssignment'
import { initProject, initPerson, searchTable, Preservation } from '@/api/Assembly/AssemblyProcessAssignment'
export default {
data() {
return {
projectValue: '',
project: [],
machineNumberValue: '',
machineNumber: [],
tableData: [],
@@ -149,30 +142,21 @@ export default {
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号,
name: response.data[i].项目名称
})
}
})
},
initPerson() { // 初始化工艺员
initPerson().then(response => {
this.tableData2 = response.data
})
},
projectChange() {
this.machineNumberValue = ''
this.machineNumber = []
if (this.projectValue !== '') {
this.check2 = 1
searchmachine(this.projectValue, this.check2).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
} else {
this.check2 = 0
}
},
selectPerson(index) { // 点击查询按钮
this.index = index
this.dialogFormVisible = true
@@ -186,9 +170,8 @@ export default {
searchTable() {
this.tableData = []
this.loading = true
this.projectValue ? this.check = 1 : this.check = 0
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
searchTable(this.check1, this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData.push({
工艺计划流水号: response.data.rows[i].工艺计划流水号,
@@ -209,12 +192,6 @@ export default {
handleSelectionChange(val) {
this.multipleSelection = val
console.log(this.multipleSelection)
// this.ProcessSerialNumber = []
// this.PersonnelNumber = []
// for (let i = 0; i < val.length; i++) {
// this.ProcessSerialNumber[i] = val[i].工艺计划流水号
// this.PersonnelNumber[i] = val[i].人员编号
// }
},
Preservation() {
if (this.multipleSelection.length !== 0) {

View File

@@ -2,24 +2,17 @@
<div class="app-container">
<el-card style="margin-bottom: 20px">
<el-row>
<span>项目名称:</span>
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="searchMachine">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>客户名称:</span>
<el-input v-model="CustomerName" size="small" placeholder="客户名称" readonly style="width: 200px"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="searchTable()">查询</el-button>
</el-row>
</el-card>
@@ -188,14 +181,11 @@
</template>
<script>
import { initProject, searchMachine, searchTable, searchTable1, addData, editData, deleteData, addData1, editData1, deleteData1 } from '@/api/Assembly/InstallationAndMonitoring'
import { initProject, searchTable, searchTable1, addData, editData, deleteData, addData1, editData1, deleteData1 } from '@/api/Assembly/InstallationAndMonitoring'
export default {
data() {
return {
projectValue: '',
project: [],
CustomerName: '',
machineNumberValue: '',
machineNumber: [],
loading: false,
@@ -245,19 +235,12 @@ export default {
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
searchMachine() { // 根据条件查机床编号
this.machineNumberValue = ''
this.machineNumber = []
searchMachine(this.projectValue).then(response => {
if (response.data.length !== 0) {
this.CustomerName = response.data[0].客户名称
}
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
value: response.data[i].机床流水号,
name: response.data[i].项目名称
})
}
})

View File

@@ -1,21 +1,16 @@
<template>
<div class="app-container">
<el-card style="margin-bottom: 20px">
<span>项目名称:</span>
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="searchMachine">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-button type="success" icon="el-icon-search" style="margin: 10px;" size="small" @click="searchTable">查询</el-button>
<el-button type="primary" icon="el-icon-download" size="small" @click="exportTable()">导出</el-button>
@@ -115,7 +110,7 @@
</template>
<script>
import { initProject, searchMachine, searchDetail, searchProcess, searchTable } from '@/api/Assembly/PrintingAssemblyProcessCard'
import { initProject, searchDetail, searchProcess, searchTable } from '@/api/Assembly/PrintingAssemblyProcessCard'
import $ from 'jquery'
import QRCode from 'qrcode'
@@ -137,8 +132,6 @@ export default {
check: 0,
check1: 0,
loading: false,
projectValue: '',
project: [],
machineNumberValue: '',
machineNumber: [],
MachineNum: '',
@@ -154,25 +147,20 @@ export default {
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
searchMachine() { // 根据条件查机床编号
this.machineNumberValue = ''
this.machineNumber = []
searchMachine(this.projectValue).then(response => {
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
value: response.data[i].机床流水号,
name: response.data[i].项目名称
})
}
})
},
searchTable() { // 主表查询
this.loading = true
this.projectValue ? this.check = 1 : this.check = 0
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
searchTable(this.check1, this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false

View File

@@ -2,21 +2,16 @@
<div class="app-container">
<el-card>
<el-row>
<span>项目名称</span>
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable @change="machineChange">
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="machineChange">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>组号:</span>
<el-select v-model="groupNumberValue" placeholder="组号" size="small" clearable>
@@ -63,17 +58,6 @@
</template>
</el-table-column>
</el-table>
<!--<div class="block" style="margin-top: 10px;">-->
<!--<el-pagination-->
<!--@size-change="handleSizeChange"-->
<!--@current-change="handleCurrentChange"-->
<!--:current-page="pageCurrent"-->
<!--:page-sizes="[10, 20, 30, 40, 50]"-->
<!--:page-size="pageSize"-->
<!--layout="total, sizes, prev, pager, next, jumper"-->
<!--:total="total">-->
<!--</el-pagination>-->
<!--</div>-->
</el-card>
<el-card>
<el-tabs type="border-card" @tab-click="selectPart">
@@ -90,6 +74,11 @@
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="前零件图号" align="center">
<template slot-scope="scope">
{{ scope.row.前零件图号 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center">
<template slot-scope="scope">
{{ scope.row.材料 }}
@@ -110,6 +99,16 @@
{{ scope.row.库存数量 }}
</template>
</el-table-column>
<el-table-column label="需求数量" align="center">
<template slot-scope="scope">
{{ scope.row.需求数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120px" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" @click="handleEdit(scope.row)">使用</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="外购件">
@@ -147,12 +146,17 @@
</el-table-column>
<el-table-column label="库存数量" align="center">
<template slot-scope="scope">
{{ scope.row.库存 }}
{{ scope.row.安全库存量 }}
</template>
</el-table-column>
<el-table-column label="需求数量" align="center">
<template slot-scope="scope">
{{ scope.row.需求数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120px" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" @click="handleEdit(scope.row)">使用</el-button>
<el-button type="primary" size="mini" icon="el-icon-edit" @click="handleEdit2(scope.row)">使用</el-button>
</template>
</el-table-column>
</el-table>
@@ -192,12 +196,17 @@
</el-table-column>
<el-table-column label="库存数量" align="center">
<template slot-scope="scope">
{{ scope.row.库存 }}
{{ scope.row.安全库存量 }}
</template>
</el-table-column>
<el-table-column label="需求数量" align="center">
<template slot-scope="scope">
{{ scope.row.需求数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120px" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" @click="handleEdit(scope.row)">使用</el-button>
<el-button type="primary" size="mini" icon="el-icon-edit" @click="handleEdit2(scope.row)">使用</el-button>
</template>
</el-table-column>
</el-table>
@@ -307,6 +316,7 @@
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" @click="handleEdit1(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="MoveOut(scope.row)">移出</el-button>
</template>
</el-table-column>
@@ -314,6 +324,11 @@
</el-card>
<el-card>
<el-table :data="tableData5" border size="mini" style="width: 100%" height="300px">
<el-table-column label="物料代码" align="center">
<template slot-scope="scope">
{{ scope.row.物料代码 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
@@ -366,6 +381,7 @@
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" @click="handleEdit1(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" @click="MoveOut(scope.row)">移出</el-button>
</template>
</el-table-column>
@@ -373,12 +389,6 @@
</el-card>
<el-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="请购单编号" prop="请购单编号">
<el-input
v-model="form.请购单编号"
size="small"
style="width:200px"/>
</el-form-item>
<el-form-item label="请购车间" prop="请购车间">
<el-input
@@ -411,6 +421,31 @@
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible3" title="更改数量" center style="min-height: 300px" width="400px">
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="数量" prop="数量">
<el-input
v-model="form3.数量"
size="small"
style="width:200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel('form3')">取消</el-button>
<el-button type="primary" @click="submitEdit1('form3')">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible4" title="使用库存" center style="min-height: 300px" width="400px">
<el-form ref="form4" :model="form4" :rules="rules4" label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="数量" prop="数量">
<el-input-number v-model="form4.数量" :min="0" :max="100" size="small" style="width:200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel('form4')">取消</el-button>
<el-button type="primary" @click="submitEdit2('form4')">确定</el-button>
</div>
</el-dialog>
<el-dialog
:visible.sync="dialogFormVisible1"
title="基本件打回信息"
@@ -551,15 +586,13 @@
</template>
<script>
import { initProject, searchmachine, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, submit, submit1, Delete, Delete1 } from '@/api/ManufacturingCenter/PartAssignment'
import { initProject, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, submit, submit1, Delete, Delete1, editStock, editNum } from '@/api/ManufacturingCenter/PartAssignment'
import { mapGetters } from 'vuex'
export default {
inject: ['reload'],
data() {
return {
projectValue: '',
projectFloatValue: '',
project: [],
machineNumberValue: '',
machineFloatValue: '',
machineNumber: [],
@@ -567,6 +600,9 @@ export default {
groupNumberValue: '',
groupFloatValue: '',
groupNumber: [],
StandardAndOutsourcing: '',
PartNum: '',
DetailedNum: '',
PurchaseOrder: '',
PartType: '基本件',
tableData: [],
@@ -590,9 +626,22 @@ export default {
请购车间: [{ required: true, message: '请输入请购车间', trigger: 'blur' }],
请购时间: [{ required: true, message: '请选择请购时间', trigger: 'change' }]
},
form3: {
数量: ''
},
rules3: {
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
},
form4: {
数量: ''
},
rules4: {
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
},
BasicPartsNumber: [],
StandardPartsAndOutsourcing: [],
MaterialNum: [],
MaterialCode: [],
MaterialName: [],
PartToolNumber: [],
MaterialSpecification: [],
@@ -613,7 +662,9 @@ export default {
tableData9: [],
tableData10: [],
dialogFormVisible1: false,
dialogFormVisible2: false
dialogFormVisible2: false,
dialogFormVisible3: false,
dialogFormVisible4: false
}
},
computed: {
@@ -629,7 +680,15 @@ export default {
},
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
initProject().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
name: response.data[i].项目名称,
value: response.data[i].机床流水号
})
}
})
PartCallbackInformation().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
@@ -773,25 +832,6 @@ export default {
return 'adopt'
}
},
projectChange() {
this.machineNumberValue = ''
this.machineNumber = []
this.groupNumberValue = ''
this.groupNumber = []
if (this.projectValue !== '') {
this.check = 1
searchmachine(this.projectValue, this.check).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.machineNumber.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
} else {
this.check = 0
}
},
machineChange() {
this.groupNumberValue = ''
this.groupNumber = []
@@ -806,16 +846,13 @@ export default {
},
searchTable() {
this.loading = true
if (this.projectValue !== '') {
this.check1 = 1
} else { this.check1 = 0 }
if (this.machineNumberValue !== '') {
this.check2 = 1
} else { this.check2 = 0 }
if (this.groupNumberValue !== '') {
this.check3 = 1
} else { this.check3 = 0 }
searchTable(this.projectValue, this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3).then(response => {
searchTable(this.machineNumberValue, this.check2, this.groupNumberValue, this.check3).then(response => {
this.tableData = response.data
this.tableData1 = []
this.tableData2 = []
@@ -885,7 +922,7 @@ export default {
submitAdd(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
addData(this.form.请购单编号, this.form.请购车间, this.name, this.id, this.form.请购时间).then(response => {
addData(this.form.请购车间, this.name, this.id, this.form.请购时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogFormVisible = false
@@ -906,15 +943,13 @@ export default {
this.title = '编辑'
this.dialogFormVisible = true
this.RequisitionList = row.请购单流水号
this.form.请购单编号 = row.请购单编号
this.form.请购车间 = row.请购车间
this.form.请购时间 = row.请购时间
},
submitEdit(formName) { // 提交单据编辑
this.$refs[formName].validate((valid) => {
if (valid) {
console.log(this.form.请购时间)
editData(this.RequisitionList, this.form.请购单编号, this.form.请购车间, this.form.请购时间).then(response => {
editData(this.RequisitionList, this.form.请购车间, this.form.请购时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.dialogFormVisible = false
@@ -953,6 +988,81 @@ export default {
this.dialogFormVisible = false
this.$refs[formName].resetFields()
},
handleEdit1(row) { // 弹出单据编辑
if (this.$refs['form3'] !== undefined) {
this.$refs['form3'].resetFields()
}
this.dialogFormVisible3 = true
this.DetailedNum = row.请购单明细流水号
this.form3.数量 = row.零件数量
},
submitEdit1(formName) { // 提交单据编辑
this.$refs[formName].validate((valid) => {
if (valid) {
editNum(this.DetailedNum, this.form3.数量).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.dialogFormVisible3 = false
searchDetailed(this.RequisitionList).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].物料计划到货时间 !== '') {
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
}
}
this.tableData5 = response.data
})
searchDetailed1(this.RequisitionList).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].物料计划到货时间 !== '') {
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
}
}
this.tableData6 = response.data
})
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
handleEdit2(row) { // 弹出单据编辑
if (this.$refs['form4'] !== undefined) {
this.$refs['form4'].resetFields()
}
this.dialogFormVisible4 = true
this.StandardAndOutsourcing = row.标准件和外购件流水号
this.PartNum = row.零件数量
},
submitEdit2(formName) { // 提交使用库存数量
this.$refs[formName].validate((valid) => {
if (valid) {
editStock(this.RequisitionList, this.form4.数量, this.PartNum).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.dialogFormVisible4 = false
if (this.PartType === '基本件') {
searchPart(this.groupFloatValue).then(response => {
this.tableData1 = response.data
})
} else if (this.PartType === '外购件') {
searchPart1(this.groupFloatValue, 2).then(response => {
this.tableData2 = response.data
})
} else if (this.PartType === '标准件') {
searchPart1(this.groupFloatValue, 1).then(response => {
this.tableData3 = response.data
})
}
} else { this.$message.error('编辑失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
searchDetailed(row) {
this.RequisitionList = row.请购单流水号
searchDetailed(row.请购单流水号).then(response => {
@@ -987,11 +1097,12 @@ export default {
this.MaterialName[i] = val[i].零件名称
this.PartToolNumber[i] = val[i].零件图号
this.Material[i] = val[i].材料
this.NumberOfParts[i] = val[i].零件数量
this.NumberOfParts[i] = val[i].需求数量
this.ReMarks[i] = val[i].零件备注
}
} else if (this.PartType === '外购件') {
this.MaterialNum = []
this.MaterialCode = []
this.StandardPartsAndOutsourcing = []
this.MaterialName = []
this.MaterialSpecification = []
@@ -1000,14 +1111,16 @@ export default {
for (let i = 0; i < val.length; i++) {
this.StandardPartsAndOutsourcing[i] = val[i].标准件和外购件流水号
this.MaterialNum[i] = val[i].物料流水号
this.MaterialCode[i] = val[i].物料代码
this.MaterialName[i] = val[i].物料名称
this.MaterialSpecification[i] = val[i].物料规格
this.MaterialModel[i] = val[i].物料型号
this.NumberOfParts[i] = val[i].零件数量
this.NumberOfParts[i] = val[i].需求数量
this.ReMarks[i] = val[i].备注
}
} else if (this.PartType === '标准件') {
this.MaterialNum = []
this.MaterialCode = []
this.StandardPartsAndOutsourcing = []
this.MaterialName = []
this.MaterialSpecification = []
@@ -1016,10 +1129,11 @@ export default {
for (let i = 0; i < val.length; i++) {
this.StandardPartsAndOutsourcing[i] = val[i].标准件和外购件流水号
this.MaterialNum[i] = val[i].物料流水号
this.MaterialCode[i] = val[i].物料代码
this.MaterialName[i] = val[i].物料名称
this.MaterialSpecification[i] = val[i].物料规格
this.MaterialModel[i] = val[i].物料型号
this.NumberOfParts[i] = val[i].零件数量
this.NumberOfParts[i] = val[i].需求数量
this.ReMarks[i] = val[i].备注
}
}
@@ -1054,7 +1168,7 @@ export default {
}
} else if (this.PartType === '外购件') {
for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) {
purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 2, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialCode[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 2, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
this.result += parseInt(response.data[0].result)
if (this.result === this.StandardPartsAndOutsourcing.length) {
this.$message.success('请购成功')
@@ -1074,7 +1188,7 @@ export default {
}
} else if (this.PartType === '标准件') {
for (let i = 0; i < this.StandardPartsAndOutsourcing.length; i++) {
purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 1, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
purchaseRequisition1(this.RequisitionList, this.projectName, this.projectFloatValue, this.MachineToolNumber, this.machineFloatValue, this.groupName, this.groupFloatValue, this.StandardPartsAndOutsourcing[i], this.MaterialName[i], this.MaterialCode[i], this.MaterialSpecification[i], this.MaterialModel[i], this.NumberOfParts[i], 1, this.time, this.MaterialNum[i], this.ReMarks[i]).then(response => {
this.result += parseInt(response.data[0].result)
if (this.result === this.StandardPartsAndOutsourcing.length) {
this.$message.success('请购成功')

View File

@@ -27,13 +27,6 @@
<el-col :span="6">
<el-form-item label="预付款">
<el-input v-model="AdvanceCharge" size="small" placeholder="预付款"/>
<!--<el-select v-model="payMethodValue" placeholder="预付款" size="small" @change="payMethodChange">-->
<!--<el-option-->
<!--v-for="item in payMethod"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
</el-form-item>
</el-col>
</el-row>
@@ -53,8 +46,6 @@
<el-form-item label="规定到货时间">
<el-date-picker
v-model="stipulateArrivalTime"
:picker-options="endDateOpt"
:disabled="Boolean(!contractNumValue)"
size="small"
type="date"
format="yyyy-MM-dd"
@@ -78,6 +69,16 @@
<el-card>
<el-table :data="tableData4" border style="width: 100%;max-height: 400px;" height="300px" size="mini">
<el-table-column label="单件定额工时" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.单件定额工时 }}
</template>
</el-table-column>
<el-table-column label="准结定额工时" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.准结定额工时 }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.单价" size="mini" style="width:70px"/>
@@ -127,16 +128,21 @@
</el-table-column>
</el-table>
<el-table :data="tableData3" border style="width: 100%;max-height: 400px;" height="300px" size="mini">
<el-table-column label="单件定额工时" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.单件定额工时 }}
</template>
</el-table-column>
<el-table-column label="准结定额工时" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.准结定额工时 }}
</template>
</el-table-column>
<el-table-column label="单价" align="center" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.单价" size="mini" style="width:70px"/>
</template>
</el-table-column>
<!--<el-table-column label="发货天数" align="center" width="150">-->
<!--<template slot-scope="scope">-->
<!--<el-input v-model="deliveryDay[scope.$index]" size="mini" style="width:70px"/>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="物料名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
@@ -179,23 +185,6 @@
<el-input v-model="scope.row.备注" size="small" style="width: 120px" @change="update(scope.row)"/>
</template>
</el-table-column>
<!--<el-table-column label="计算方式" align="center" width="110">-->
<!--<template slot-scope="scope">-->
<!--<el-select v-model="calculateWayValue[scope.$index]" style="width:75px" size="mini">-->
<!--<el-option-->
<!--v-for="item in calculateWay"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value">-->
<!--</el-option>-->
<!--</el-select>-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="重量" align="center" width="100">-->
<!--<template slot-scope="scope">-->
<!--<el-input size="mini" v-model="weight[scope.$index]" style="width:70px"></el-input>-->
<!--</template>-->
<!--</el-table-column>-->
</el-table>
<el-button
type="primary"
@@ -216,8 +205,6 @@
icon=""
style="margin-left: 4.5%"
@click="doneContract">生成采购合同</el-button>
<!--<el-button type="primary" size="small" icon="" style="float:right;margin: 0 10px 15px 0"-->
<!--@click="doneContract">生成采购合同</el-button>-->
</el-card>
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
@@ -335,21 +322,13 @@
</template>
<script>
import { searchSupplier, update, doneContract, initPurchaseOrder, searchData, searchData1, searchData2, searchContractDemo } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
import { searchSupplier, update, doneContract, initPurchaseOrder, searchData1, searchData2, searchContractDemo } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
import { mapGetters } from 'vuex'
export default {
inject: ['reload'],
data() {
return {
submitDisable: true, // 不点击表格中的行不让确定
minDate: null,
endDateOpt: { // 禁用大于规定到货日期和小于当前日期
disabledDate: (time) => {
if (this.minDate) {
return time.getTime() > this.minDate || time.getTime() < new Date()
}
}
},
AdvanceCharge: '',
loading: false,
dialogVisible1: false,
@@ -444,7 +423,9 @@ export default {
group7: '',
group8: '',
group9: '',
group10: ''
group10: '',
group11: '',
group12: ''
}
},
computed: {
@@ -460,14 +441,6 @@ export default {
},
methods: {
searchData() {
const numGroup = [] // 空数组,放物料的计划到货时间
searchData(this.contractNumValue).then(response => {
console.log(response.data, 111)
for (let i = 0; i < response.data.length; i++) {
numGroup.push(Date.parse(response.data[i].物料计划到货时间))
}
this.minDate = new Date(Math.min(...numGroup))
})
searchData1(this.contractNumValue).then(response => {
console.log(response.data, 222)
for (let j = 0; j < response.data.length; j++) {
@@ -607,12 +580,12 @@ export default {
this.group1 = ''
this.group2 = ''
this.group3 = ''
// this.group5 = ''
// this.group6 = ''
this.group7 = ''
this.group8 = ''
this.group9 = ''
this.group10 = ''
this.group11 = ''
this.group12 = ''
for (let i = 0; i < this.tableData3.length; i++) {
this.group1 += this.tableData3[i].物料流水号 + ','
this.group2 += this.tableData3[i].零件数量 + ','
@@ -620,6 +593,8 @@ export default {
this.group7 += this.taxRate + ','
this.group8 += this.currencyValue + ','
this.group9 += this.tableData3[i].请购单明细流水号 + ','
this.group11 += this.tableData3[i].单件定额工时 + ','
this.group12 += this.tableData3[i].准结定额工时 + ','
}
for (let i = 0; i < this.tableData4.length; i++) {
this.group1 += this.tableData4[i].物料流水号 + ','
@@ -628,56 +603,18 @@ export default {
this.group7 += this.taxRate + ','
this.group8 += this.currencyValue + ','
this.group9 += this.tableData4[i].请购单明细流水号 + ','
this.group11 += this.tableData4[i].单件定额工时 + ','
this.group12 += this.tableData4[i].准结定额工时 + ','
}
for (let i = 0; i < this.contractNum.length; i++) {
if (this.contractNum[i].value === this.contractNumValue) {
this.RequisitionNumber = this.contractNum[i].label
}
}
// for (let i = 0; i < this.payMethod.length; i++) {
// if (this.payMethod[i].value === this.payMethodValue) {
// this.payMethodName = this.payMethod[i].label
// }
// }
// const payTimeNum = this.payMethodName.split(':')
// if (payTimeNum.length > 1) {
// for (let i = 0; i < payTimeNum.length; i++) {
// switch (i) {
// case 0:
// this.group6 += this.payTime1Value + ','
// break
// case 1:
// this.group6 += this.payTime2Value + ','
// break
// case 2:
// this.group6 += this.payTime3Value + ','
// break
// case 3:
// this.group6 += this.payTime4Value + ','
// break
// case 4:
// this.group6 += this.payTime5Value + ','
// break
// case 5:
// this.group6 += this.payTime6Value + ','
// break
// }
// this.group5 += payTimeNum[i] + ',' // 付款比例 付款方式 付款计划
// }
// } else {
// this.group5 = '10,' // 付款比例 付款方式 付款计划
// this.group6 = this.payTime1Value + ',' // 付款时间
// }
this.group1 = this.group1.substr(0, this.group1.length - 1)
this.group2 = this.group2.substr(0, this.group2.length - 1)
this.group3 = this.group3.substr(0, this.group3.length - 1)
// this.group5 = this.group5.substr(0, this.group5.length - 1)
// this.group6 = this.group6.substr(0, this.group6.length - 1)
// this.group7 = this.group7.substr(0, this.group7.length - 1)
// this.group8 = this.group8.substr(0, this.group8.length - 1)
// this.group9 = this.group9.substr(0, this.group9.length - 1)
// this.group10 = this.group10.substr(0, this.group10.length - 1)
doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.supplierValue, this.textArea, this.freight, this.group1, this.group2, this.group3, this.group7, this.group8, this.group9, this.id, this.AdvanceCharge).then(response => {
doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.supplierValue, this.textArea, this.freight, this.group1, this.group2, this.group3, this.group7, this.group8, this.group9, this.id, this.group11, this.group12, this.AdvanceCharge).then(response => {
if (response.data[0].result === '1') {
this.$message.success('生成合同成功')
this.reload()

View File

@@ -22,20 +22,6 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>项目名称:</span>
<el-select
v-model="projectNameValue"
placeholder="项目名称"
size="small"
style="width:100px"
clearable
@change="searchMachine()">
<el-option
v-for="item in projectName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select
v-model="machineValue"
@@ -48,7 +34,10 @@
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>组号:</span>
<el-select
@@ -230,23 +219,7 @@
<el-dialog :visible.sync="dialogFormVisible1" title="已完工艺选择" center width="800px">
<el-form ref="form1" :model="form1" label-position="left" label-width="140px" class="demo-ruleForm">
<el-row>
<el-col :span="10">
<el-form-item label="项目名称">
<el-select
v-model="projectNameValue1"
placeholder="项目名称"
size="small"
style="width:150px"
@change="searchMachine1()">
<el-option
v-for="item in projectName1"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-col :span="12">
<el-form-item label="机床名称">
<el-select
v-model="machineValue1"
@@ -258,16 +231,14 @@
v-for="item in Machine1"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-button size="small" type="success" icon="el-icon-search" @click="searchDetail1()">查询</el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-col :span="12">
<el-form-item label="组号">
<el-select
v-model="groupNumberValue1"
@@ -283,7 +254,9 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="图号/名称">
<el-input
v-model="partNum1"
@@ -294,7 +267,8 @@
@dblclick.native="searchParts1"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="12">
<el-button size="small" type="success" icon="el-icon-search" @click="searchDetail1()">查询</el-button>
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
</el-col>
</el-row>
@@ -524,7 +498,6 @@ import '@/icon/iconfont.css'
import {
initCraftmen,
getProject,
getMachine,
getGroup,
getPartnames1,
getProcedure,
@@ -553,16 +526,12 @@ export default {
},
data() {
return {
projectNameValue: '',
projectName: [],
machineValue: '',
Machine: [],
groupNumberValue: '',
groupNumber: [],
groupNum: '',
groupType: '',
projectNameValue1: '',
projectName1: [],
machineValue1: '',
Machine1: [],
groupNumberValue1: '',
@@ -644,11 +613,12 @@ export default {
})
}
})
getProject(0).then(response => { // 初始化项目
getProject(0).then(response => { // 初始化机床项目
for (let i = 0; i < response.data.length; i++) {
this.projectName.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号,
name: response.data[i].项目名称
})
}
})
@@ -675,18 +645,15 @@ export default {
this.isShow2 = false
}
this.checked = false
this.projectNameValue = ''
this.projectName = []
getProject(this.radio).then(response => { // 初始化项目
getProject(this.radio).then(response => { // 初始化机床项目
for (let i = 0; i < response.data.length; i++) {
this.projectName.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号,
name: response.data[i].项目名称
})
}
})
this.machineValue = ''
this.Machine = []
this.groupNumberValue = ''
this.groupNumber = []
this.partNum = ''
@@ -724,21 +691,6 @@ export default {
})
}
},
searchMachine() {
this.clear()
this.machineValue = ''
this.Machine = []
this.groupNumberValue = ''
this.groupNumber = []
getMachine(this.radio, this.projectNameValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
searchGroup() {
this.clear()
this.groupNumberValue = ''
@@ -824,20 +776,6 @@ export default {
}
})
},
searchMachine1() {
this.machineValue1 = ''
this.Machine1 = []
this.groupNumberValue1 = ''
this.groupNumber1 = []
getMachine(1, this.projectNameValue1).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine1.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
searchGroup1() {
this.groupNumberValue1 = ''
this.groupNumber1 = []
@@ -993,18 +931,17 @@ export default {
WYbtn() { // 完艺按钮
this.tableData4 = []
this.dialogFormVisible1 = true
this.projectNameValue1 = ''
this.projectName1 = []
this.machineValue1 = ''
this.Machine1 = []
this.groupNumberValue1 = ''
this.groupNumber1 = []
this.partNum1 = ''
getProject(1).then(response => { // 初始化项目
getProject(1).then(response => { // 初始化机床项目
for (let i = 0; i < response.data.length; i++) {
this.projectName1.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
this.Machine1.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号,
name: response.data[i].项目名称
})
}
})

View File

@@ -14,20 +14,6 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>项目名称:</span>
<el-select
v-model="projectNameValue"
placeholder="项目名称"
size="small"
style="width:100px"
clearable
@change="searchMachine()">
<el-option
v-for="item in projectName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select
v-model="machineValue"
@@ -40,7 +26,10 @@
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>组号:</span>
<el-select
@@ -208,7 +197,7 @@
</template>
<script>
import { getPerson, getPartnames1, getProject, getMachine, getGroup, update, getProcedure, returnEdit, saveApprove } from '@/api/WorkshopProcurement/OutsourcingQuotaSetting'
import { getPerson, getPartnames1, getProject, getGroup, update, getProcedure, returnEdit, saveApprove } from '@/api/WorkshopProcurement/OutsourcingQuotaSetting'
export default {
data() {
@@ -257,11 +246,12 @@ export default {
})
}
})
getProject(0).then(response => { // 初始化项目
getProject(0).then(response => { // 初始化机床项目
for (let i = 0; i < response.data.length; i++) {
this.projectName.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号,
name: response.data[i].项目名称
})
}
})
@@ -281,13 +271,12 @@ export default {
this.isShow2 = false
}
this.checked = false
this.projectNameValue = ''
this.projectName = []
getProject(this.radio).then(response => { // 初始化项目
getProject(this.radio).then(response => { // 初始化机床项目
for (let i = 0; i < response.data.length; i++) {
this.projectName.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号,
name: response.data[i].项目名称
})
}
})
@@ -348,21 +337,6 @@ export default {
})
}
},
searchMachine() {
this.clear()
this.machineValue = ''
this.Machine = []
this.groupNumberValue = ''
this.groupNumber = []
getMachine(this.radio, this.projectNameValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
searchGroup() {
this.clear()
this.groupNumberValue = ''

View File

@@ -89,7 +89,7 @@
</el-card>
<el-card>
<div style="width:900px;margin-left: 350px">
<div style="width:1000px;margin-left: 300px">
<el-card>
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
<tr style="height: 40px">
@@ -98,7 +98,7 @@
</tr>
<tr style="height: 40px">
<td colspan="1" align="center">需方</td>
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
<td colspan="1" align="center" width="37%">江苏高精机电装备有限公司</td>
<td colspan="1" align="center">合同编号</td>
<td colspan="1" align="center">{{ contract }}</td>
</tr>
@@ -120,6 +120,8 @@
<td colspan="1" align="center">交货期</td>
<td colspan="1" align="center">备注</td>
<td colspan="1" align="center">数量</td>
<td colspan="1" align="center" width="12%">单件定额工时</td>
<td colspan="1" align="center" width="12%">准结定额工时</td>
<td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td>
</tr>
@@ -135,17 +137,19 @@
<td colspan="1" align="center">交货期</td>
<td colspan="1" align="center">备注</td>
<td colspan="1" align="center">数量</td>
<td colspan="1" align="center" width="12%">单件定额工时</td>
<td colspan="1" align="center" width="12%">准结定额工时</td>
<td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td>
</tr>
</tbody>
<tfoot>
<tr style="height: 40px">
<td colspan="8">总价: (人民币){{ RMB }}(未税) </td>
<td colspan="10">总价: (人民币){{ RMB }}(未税) </td>
<td colspan="1" align="center">{{ TotalAmount }}</td>
</tr>
<tr style="height: 40px">
<td colspan="8">总价: (人民币){{ RMB1 }}({{ taxRate }}增值税) </td>
<td colspan="10">总价: (人民币){{ RMB1 }}({{ taxRate }}增值税) </td>
<td colspan="1" align="center">{{ TotalAmount1 }}</td>
</tr>
</tfoot>
@@ -458,7 +462,7 @@ export default {
for (let i = 0; i < this.returns.length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData')
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead').after(tr[i])
}
@@ -469,8 +473,10 @@ export default {
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].金额
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].件定额工时
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].准结定额工时
document.getElementsByClassName('tableData')[j].children[8].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData')[j].children[9].innerHTML = response.data[j].金额
}
})
searchTable3(this.contractValue).then(response => {
@@ -486,7 +492,7 @@ export default {
for (let i = 0; i < this.returns1.length; i++) {
tr[i] = document.createElement('tr')
tr[i].setAttribute('class', 'tableData1')
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
tr[i].innerHTML = '<td colspan="2" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
document.getElementById('tableHead1').after(tr[i])
}
@@ -497,8 +503,10 @@ export default {
document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].备注
document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].数量
document.getElementsByClassName('tableData1')[j].children[6].innerHTML = response.data[j].
document.getElementsByClassName('tableData1')[j].children[7].innerHTML = response.data[j].金额
document.getElementsByClassName('tableData1')[j].children[6].innerHTML = response.data[j].件定额工时
document.getElementsByClassName('tableData1')[j].children[7].innerHTML = response.data[j].准结定额工时
document.getElementsByClassName('tableData1')[j].children[8].innerHTML = response.data[j].单价
document.getElementsByClassName('tableData1')[j].children[9].innerHTML = response.data[j].金额
}
})
}