Merge branch 'master' of http://192.168.0.149:10010/r/高精2.0
This commit is contained in:
@@ -103,7 +103,7 @@ export function submitOutStore(...params) {
|
||||
data: {
|
||||
type: '2',
|
||||
name: '库存管理_物料出库_出库记录_增加数据',
|
||||
param: `物料流水号=${params[0]}&货位流水号=${params[1]}&出库数量=${params[2]}&出库人流水号=${params[3]}&基本件流水号=${params[4]}&标准件和外购件流水号=${params[5]}&请购单明细流水号=${params[6]}`
|
||||
param: `物料流水号=${params[0]}&货位流水号=${params[1]}&出库数量=${params[2]}&出库人流水号=${params[3]}&基本件流水号=${params[4]}&标准件和外购件流水号=${params[5]}&请购单明细流水号=${params[6]}&领料单流水号=${params[7]}&领料人流水号=${params[8]}&仓库流水号=${params[9]}&出库类别=${params[10]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -119,3 +119,14 @@ export function errorRecord(...params) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化出库类别
|
||||
export function initOutType() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: 'select * from 库存管理_出库类别'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export function JurisdictionControl(num1, num2) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 所有工序
|
||||
// 所有工序(原)
|
||||
export function getTable2(stepNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
@@ -69,6 +69,18 @@ export function getTable2(stepNumber) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 所有工序(新)
|
||||
export function getTable3(stepNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_加工进度修改2_查询',
|
||||
param: '工艺计划流水号=' + stepNumber
|
||||
}
|
||||
})
|
||||
}
|
||||
// 正在加工零件
|
||||
export function searchParts(stepNumber) {
|
||||
return request({
|
||||
|
||||
@@ -45,7 +45,7 @@ export function doneContract(...params) {
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_采购合同_增加数据',
|
||||
param: `采购合同编号=${params[0]}\\&采购合同名称=${params[1]}\\&交货日期=${params[2]}\\&支付日期=${params[3]}\\&支付方式=${params[4]}\\&开票信息=${params[5]}\\&其他说明=${params[6]}\\&合同总额=${params[7]}\\&采购员流水号=${params[8]}\\&供应商流水号=${params[9]}\\&单价是否含税=${params[10]}\\&组件零件流水号组=${params[11]}\\&组件零件基本件流水号组=${params[12]}\\&数量组=${params[13]}\\&单价组=${params[14]}\\&交货期组=${params[15]}\\&合同内容\\=${params[16]}\\&税率=${params[17]}`
|
||||
param: `采购合同编号=${params[0]}\\&采购合同名称=${params[1]}\\&交货日期=${params[2]}\\&支付日期=${params[3]}\\&支付方式=${params[4]}\\&开票信息=${params[5]}\\&其他说明=${params[6]}\\&合同总额=${params[7]}\\&采购员流水号=${params[8]}\\&供应商流水号=${params[9]}\\&单价是否含税=${params[10]}\\&组件零件流水号组=${params[11]}\\&组件零件基本件流水号组=${params[12]}\\&数量组=${params[13]}\\&单价组=${params[14]}\\&交货期组=${params[15]}\\&合同内容\\=${params[16]}\\&税率=${params[17]}\\&询价单明细流水号组=${params[18]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -61,3 +61,14 @@ export function searchBaseInfo(id) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 实时保存单价
|
||||
export function savePrice(price, num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '4',
|
||||
name: `update 采购管理_询价单明细_视图 set 单价 = ${price} where 物料流水号 = ${num1} and 询价单流水号 = ${num2}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export const ServerIP = `http://192.168.1.231:8411/webpage/file/`
|
||||
export const uploadFileMachine = `http://192.168.1.231:8411/submit/uploadFileMachine.ashx` // 机床总图 发布时改成0.231
|
||||
export const downloadFileMachine = `http://192.168.1.231:8411/submit/downloadFileMachine.ashx` // 机床总图 发布时改成0.231
|
||||
const service = axios.create({
|
||||
baseURL: `http://192.168.1.231:8411/submit/MESCommonBase.ashx`,
|
||||
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
|
||||
timeout: 1500000 // 请求超时时间
|
||||
})
|
||||
|
||||
|
||||
@@ -129,6 +129,8 @@ export function groupBy(datas, keys) {
|
||||
group.key.数量 = group.data1 += v.数量
|
||||
group.data2 = group.data2 || ''
|
||||
group.key.机床图号_组号 = group.data2 += (v.机床图号 || '') + '-' + (v.组号 ? v.组号.split('组')[0] : '') + ';'
|
||||
group.data3 = group.data3 || 0
|
||||
group.key.合计 = group.data3 += v.合计
|
||||
})
|
||||
groups.map(v => {
|
||||
result.push(v.key)
|
||||
|
||||
@@ -185,6 +185,15 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库类别" prop="outTypeValue" label-width="100px">
|
||||
<el-select v-model="form1.outTypeValue" size="small" placeholder="出库类别" style="width: 200px;margin-right:10px">
|
||||
<el-option
|
||||
v-for="item in outType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible1=false">取消</el-button>
|
||||
@@ -210,12 +219,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initPickPerson, initMachineProject, searchgroup, searchList, searchListDetail, searchStockNumber1, searchStockNumber2, submitOutStore, errorRecord, searchStockNumber3 } from '@/api/Inventory/MaterialOut'
|
||||
import { initPickPerson, initMachineProject, searchgroup, searchList, searchListDetail, searchStockNumber1, searchStockNumber2, submitOutStore, errorRecord, searchStockNumber3, initOutType } from '@/api/Inventory/MaterialOut'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'MaterialOut',
|
||||
data() {
|
||||
return {
|
||||
pickingListNum: '', // 领料单流水号
|
||||
pickingPersonNum: '', // 领料人流水号
|
||||
pickingListNumber: '',
|
||||
pickingListNumberShow: '',
|
||||
pickListTable1: [],
|
||||
@@ -226,12 +237,14 @@ export default {
|
||||
StockNumberTable: [],
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
outType: [],
|
||||
form1: {
|
||||
machineValue: '',
|
||||
groupNumValue: '',
|
||||
outNumber: '',
|
||||
outNumberMax: '', // 出库最大值
|
||||
personValue: ''
|
||||
personValue: '',
|
||||
outTypeValue: '' // 出库类别
|
||||
},
|
||||
form2: {
|
||||
errorNumber: '',
|
||||
@@ -244,7 +257,8 @@ export default {
|
||||
machineValue: [{ required: true, message: '请选择' }],
|
||||
groupNumValue: [{ required: true, message: '请选择' }],
|
||||
outNumber: [{ required: true, message: '请输入' }],
|
||||
personValue: [{ required: true, message: '请输入' }]
|
||||
personValue: [{ required: true, message: '请输入' }],
|
||||
outTypeValue: [{ required: true, message: '请选择' }] // 出库类别
|
||||
},
|
||||
rules2: {
|
||||
errorNumber: [{ required: true, message: '请输入' }],
|
||||
@@ -259,6 +273,7 @@ export default {
|
||||
basePartNum: '', // 中间变量基本件流水号
|
||||
purchaseBillNum: '', // 中间变量请购单明细流水号
|
||||
parchasePartNum: '', // 中间变量标准件和外购件流水号
|
||||
inventoryNum: '', // 中间变量仓库流水号
|
||||
locationNum: '', // 中间变量货位流水号
|
||||
outNumber: 0 // 中间变量出库数量
|
||||
}
|
||||
@@ -294,6 +309,14 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
initOutType().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.outType.push({
|
||||
label: response.data[i].出库类别名称,
|
||||
value: response.data[i].出库类别流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询组号
|
||||
searchGroup() {
|
||||
@@ -329,6 +352,7 @@ export default {
|
||||
// 查看领料单明细
|
||||
clickList(row) {
|
||||
row && row.领料单流水号 ? this.pickingListNum = row.领料单流水号 : this.pickingListNum
|
||||
row && row.人员编号 ? this.pickingPersonNum = row.人员编号 : this.pickingListNum
|
||||
row && row.领料单编号 ? this.pickingListNumberShow = row.领料单编号 : this.pickingListNumberShow
|
||||
searchListDetail(this.pickingListNum).then(res => {
|
||||
this.pickListTable2 = res.data
|
||||
@@ -336,7 +360,6 @@ export default {
|
||||
},
|
||||
// 查看领料单明细相关的物料货位数量
|
||||
clickListDetail(row) {
|
||||
console.log(row, 111)
|
||||
row && row.基本件流水号 ? (this.basePartNum = row.基本件流水号, this.materialNum = null, this.parchasePartNum = null, this.purchaseBillNum = null) : this.basePartNum
|
||||
row && row.物料流水号 ? (this.materialNum = row.物料流水号, this.basePartNum = null, this.purchaseBillNum = null) : this.materialNum
|
||||
row && row.标准件和外购件流水号 ? (this.parchasePartNum = row.标准件和外购件流水号, this.basePartNum = null, this.purchaseBillNum = null) : this.parchasePartNum
|
||||
@@ -364,6 +387,7 @@ export default {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.form1.machineValue = this.machineValue
|
||||
this.inventoryNum = row.仓库流水号
|
||||
this.locationNum = row.货位流水号
|
||||
this.outNumber > row.货位存量 ? (this.form1.outNumber = row.货位存量, this.form1.outNumberMax = row.货位存量) : (this.form1.outNumber = this.outNumber, this.form1.outNumberMax = this.outNumber) // 货位存量和领料数量对比取小
|
||||
this.form1.personValue = Number(this.id)
|
||||
@@ -387,7 +411,7 @@ export default {
|
||||
if (valid) {
|
||||
// 出库数量,出库人,基本件流水号/标准件和外购件流水号 => 记录到一个新表
|
||||
// 物料流水号,货位流水号,出库数量 => 减掉货位物料数
|
||||
submitOutStore(this.materialNum, this.locationNum, this.form1.outNumber, this.form1.personValue, this.basePartNum, this.parchasePartNum, this.purchaseBillNum).then(response => {
|
||||
submitOutStore(this.materialNum, this.locationNum, this.form1.outNumber, this.form1.personValue, this.basePartNum, this.parchasePartNum, this.purchaseBillNum, this.pickingListNum, this.pickingPersonNum, this.inventoryNum, this.form1.outTypeValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('出库成功')
|
||||
this.dialogFormVisible1 = false
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchParts, getMachine, getMachine2, searchtable, getTable2, Order, JurisdictionControl, JurisdictionContro2, outParts } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
|
||||
import { searchParts, getMachine, getMachine2, searchtable, getTable3, Order, JurisdictionControl, JurisdictionContro2, outParts } from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
|
||||
import { wsuri, name } from '@/utils/request'
|
||||
export default {
|
||||
data() {
|
||||
@@ -379,7 +379,7 @@ export default {
|
||||
})
|
||||
},
|
||||
getRowKeys(row) {
|
||||
return row.零件图号
|
||||
return row.工艺计划流水号
|
||||
},
|
||||
selectMachine(row) {
|
||||
this.process = []
|
||||
@@ -388,7 +388,7 @@ export default {
|
||||
this.colorCode = []
|
||||
this.realDate = []
|
||||
this.tableData2 = []
|
||||
getTable2(row.零件图号).then(response => {
|
||||
getTable3(row.工艺计划流水号).then(response => {
|
||||
for (let k = 0; k < response.data.length; k++) {
|
||||
this.process[k] = response.data[k].工艺名称简称
|
||||
this.planDate[k] = response.data[k].计划日期_短
|
||||
@@ -469,18 +469,18 @@ export default {
|
||||
},
|
||||
searchTable2(row) {
|
||||
if (this.a === 1) {
|
||||
this.expands.push(row.零件图号)
|
||||
this.b = row.零件图号
|
||||
this.expands.push(row.工艺计划流水号)
|
||||
this.b = row.工艺计划流水号
|
||||
this.a = 0
|
||||
} else {
|
||||
if (this.b === row.零件图号) {
|
||||
if (this.b === row.工艺计划流水号) {
|
||||
this.expands = []
|
||||
this.a = 1
|
||||
} else {
|
||||
this.expands = []
|
||||
this.expands.push(row.零件图号)
|
||||
this.expands.push(row.工艺计划流水号)
|
||||
this.a = 0
|
||||
this.b = row.零件图号
|
||||
this.b = row.工艺计划流水号
|
||||
}
|
||||
}
|
||||
this.process = []
|
||||
@@ -489,7 +489,7 @@ export default {
|
||||
this.colorCode = []
|
||||
this.realDate = []
|
||||
this.tableData2 = []
|
||||
getTable2(row.零件图号).then(response => {
|
||||
getTable3(row.工艺计划流水号).then(response => {
|
||||
for (let k = 0; k < response.data.length; k++) {
|
||||
this.process[k] = response.data[k].工艺名称简称
|
||||
this.planDate[k] = response.data[k].计划日期_短
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.value2 }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<el-button size="small" type="success" icon="el-icon-search" style="margin: 10px 0 0 10px" @click="asd()">查询</el-button>
|
||||
<span>分组:</span>
|
||||
<el-select v-model="NumValue" size="small" style="margin-top:10px;width: 220px" filterable clearable placeholder="机床组号">
|
||||
<el-option
|
||||
@@ -727,6 +727,7 @@ export default {
|
||||
this.getTable()
|
||||
},
|
||||
methods: {
|
||||
asd() {},
|
||||
// TABLE每行颜色
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex === 1) {
|
||||
@@ -1442,7 +1443,6 @@ export default {
|
||||
this.bianliang1.push(this.tableData1[i].工艺计划流水号)
|
||||
}
|
||||
discharge(this.bianliang1).then(response => {
|
||||
console.log(response.data)
|
||||
this.Selection1()
|
||||
})
|
||||
},
|
||||
|
||||
@@ -162,11 +162,11 @@
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
</el-row>
|
||||
<div class="block">
|
||||
@@ -993,25 +993,25 @@ export default {
|
||||
v.供货商 = v.供货商 ? v.供货商 : ''
|
||||
v.备注 = v.备注 ? v.备注 : ''
|
||||
})
|
||||
import('./Export2Excel').then(excel => {
|
||||
const dataGroup = []
|
||||
const filterVal1 = ['任务分配时间', '项目名称', '机床图号', '组号', '物料名称', '物料型号', '物料规格', '待询价数量', '备注', '供货商'] // tableData1里的属性名
|
||||
const filterVal2 = ['任务分配时间', '项目名称', '机床图号', '组号', '零件名称', '零件图号', '规格', '材料', '待询价数量', '备注', '供货商'] // tableData2里的属性名
|
||||
const data1 = res1.data.map(v => filterVal1.map(j => v[j]))
|
||||
dataGroup.push(data1)
|
||||
const data2 = res2.data.map(v => filterVal2.map(j => v[j]))
|
||||
dataGroup.push(data2)
|
||||
const headerGroup = [['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商'], ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '材料', '待询价数量', '备注', '供货商']]
|
||||
const sheetGroup = ['外购件(未询价)', '基本件(未询价)']
|
||||
excel.export_json_to_excel({
|
||||
headerGroup: headerGroup,
|
||||
dataGroup: dataGroup,
|
||||
sheetGroup: sheetGroup,
|
||||
filename: '未询价采购件明细',
|
||||
autoWidth: true,
|
||||
bookType: 'xlsx'
|
||||
import('./Export2Excel').then(excel => {
|
||||
const dataGroup = []
|
||||
const filterVal1 = ['任务分配时间', '项目名称', '机床图号', '组号', '物料名称', '物料型号', '物料规格', '待询价数量', '备注', '供货商'] // tableData1里的属性名
|
||||
const filterVal2 = ['任务分配时间', '项目名称', '机床图号', '组号', '零件名称', '零件图号', '规格', '材料', '待询价数量', '备注', '供货商'] // tableData2里的属性名
|
||||
const data1 = res1.data.map(v => filterVal1.map(j => v[j]))
|
||||
dataGroup.push(data1)
|
||||
const data2 = res2.data.map(v => filterVal2.map(j => v[j]))
|
||||
dataGroup.push(data2)
|
||||
const headerGroup = [['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '待询价数量', '备注', '供货商'], ['任务分配时间', '项目名称', '机床图号', '组号', '名称', '图号或型号', '规格', '材料', '待询价数量', '备注', '供货商']]
|
||||
const sheetGroup = ['外购件(未询价)', '基本件(未询价)']
|
||||
excel.export_json_to_excel({
|
||||
headerGroup: headerGroup,
|
||||
dataGroup: dataGroup,
|
||||
sheetGroup: sheetGroup,
|
||||
filename: '未询价采购件明细',
|
||||
autoWidth: true,
|
||||
bookType: 'xlsx'
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
@@ -1150,10 +1150,10 @@ export default {
|
||||
return (parseInt(row.询价状态编号) === 1 && parseInt(row.采购状态编号) < 3 && parseInt(row.是否确认) === 1) // 未询价&&未采购&&确认物料修改
|
||||
},
|
||||
filterHandler0(value, row) { // 筛选备注
|
||||
return row['备注'] === value
|
||||
return row['备注'].trim() === value
|
||||
},
|
||||
filterHandler(value, row) { // 筛选供货商
|
||||
return row['供货商'] === value
|
||||
return row['供货商'].trim() === value
|
||||
},
|
||||
searchTable11() { // 查询外购件列表
|
||||
let check1, check2, check3, check4, check5, check6
|
||||
@@ -1171,10 +1171,14 @@ export default {
|
||||
this.remarkFilters = []
|
||||
this.supplierFilters = []
|
||||
response.data.rows.map(v => {
|
||||
if (v.备注 === null) { v.备注 = '' }
|
||||
if (v.供货商 === null) { v.供货商 = '' }
|
||||
if (!remark.includes(v.备注)) {
|
||||
remark.push(v.备注)
|
||||
supplier.push(v.供货商)
|
||||
this.remarkFilters.push({ text: v.备注, value: v.备注 })
|
||||
}
|
||||
if (!supplier.includes(v.供货商)) {
|
||||
supplier.push(v.供货商)
|
||||
this.supplierFilters.push({ text: v.供货商, value: v.供货商 })
|
||||
}
|
||||
})
|
||||
|
||||
@@ -129,13 +129,13 @@
|
||||
</el-table-column>
|
||||
<el-table-column v-show="hasTax==='未税'" label="单价(未税)" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-show="hasTax==='未税'" v-model="scope.row.未税单价" size="mini" style="width:100%"/>
|
||||
<el-input-number v-show="hasTax==='未税'" :min="0" v-model="scope.row.未税单价" controls-position="right" size="mini" style="width:100%" @focus="scope.row.未税单价=''" @change="priceChange(scope.row.未税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row)"/>
|
||||
<b v-show="hasTax!=='未税'">—</b>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-show="hasTax==='含税'" label="单价(含税)" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-show="hasTax==='含税'" v-model="scope.row.含税单价" size="mini" style="width:100%"/>
|
||||
<el-input-number v-show="hasTax==='含税'" :min="0" v-model="scope.row.含税单价" controls-position="right" size="mini" style="width:100%" @focus="scope.row.含税单价=''" @change="priceChange(scope.row.含税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row)"/>
|
||||
<b v-show="hasTax!=='含税'">—</b>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
<script>
|
||||
import Tinymce from '@/components/Tinymce'
|
||||
import { initSupplier, searchInquirySheet, searchSheetContract, doneContract, searchBaseInfo } from '@/api/PurchasingCenter/CreatePurchaseContract'
|
||||
import { initSupplier, searchInquirySheet, searchSheetContract, doneContract, searchBaseInfo, savePrice } from '@/api/PurchasingCenter/CreatePurchaseContract'
|
||||
import { convertCurrency } from '@/vendor/int2Chinese'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { sleep, groupBy } from '@/utils/tool'
|
||||
@@ -256,6 +256,26 @@ export default {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
// 价格实时保存
|
||||
priceChange(price, num1, num2, row) {
|
||||
this.tableData1.map(v => {
|
||||
if (Number(v.物料流水号) === Number(row.物料流水号) && Number(v.询价单流水号) === Number(row.询价单流水号)) {
|
||||
v.含税单价 = row.含税单价
|
||||
v.未税单价 = row.未税单价
|
||||
}
|
||||
})
|
||||
const group = this.tableData1
|
||||
this.tableData1 = []
|
||||
this.tableData1 = group
|
||||
price = price || 0
|
||||
savePrice(price, num1, num2).then(res => {
|
||||
if (res.data[0].result === '1') {
|
||||
console.log('单价实时保存成功')
|
||||
} else {
|
||||
console.log('单价实时保存失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteAllDate() {
|
||||
this.tableData1.map(v => {
|
||||
v.交货期 = ''
|
||||
@@ -357,6 +377,9 @@ export default {
|
||||
searchSheetContract(this.contractNumValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData1.push({
|
||||
询价单流水号: response.data[i].询价单流水号,
|
||||
物料流水号: response.data[i].物料流水号,
|
||||
询价单明细流水号: response.data[i].询价单明细流水号,
|
||||
机床图号: response.data[i].机床图号,
|
||||
组号: response.data[i].组号,
|
||||
组件零件流水号: response.data[i].组件零件流水号,
|
||||
@@ -367,9 +390,9 @@ export default {
|
||||
规格: response.data[i].组件零件流水号 ? response.data[i].物料规格 : response.data[i].规格,
|
||||
数量: response.data[i].数量,
|
||||
计量单位: response.data[i].计量单位,
|
||||
未税单价: 0,
|
||||
未税单价: response.data[i].单价,
|
||||
未税总额: 0,
|
||||
含税单价: 0,
|
||||
含税单价: response.data[i].单价,
|
||||
含税总额: 0,
|
||||
备注: response.data[i].备注
|
||||
})
|
||||
@@ -384,9 +407,9 @@ export default {
|
||||
case '模板2':
|
||||
this.demo2()
|
||||
break
|
||||
// case '自定义':
|
||||
// this.customization()
|
||||
// break
|
||||
// case '自定义':
|
||||
// this.customization()
|
||||
// break
|
||||
}
|
||||
},
|
||||
demo1() { // 选择合同模板1
|
||||
@@ -570,22 +593,24 @@ export default {
|
||||
}
|
||||
const merge = []
|
||||
this.tableData1.map(v => {
|
||||
merge.push({
|
||||
机床图号: v.机床图号,
|
||||
组号: v.组号,
|
||||
图号: v.图号,
|
||||
名称: v.名称,
|
||||
规格: v.规格,
|
||||
数量: Number(v.数量),
|
||||
计量单位: v.计量单位,
|
||||
单价: this.hasTax === '含税' ? v.含税单价 : v.未税单价,
|
||||
合计: (Number(v.数量) * (this.hasTax === '含税' ? Number(v.含税单价) : Number(v.未税单价))).toFixed(2),
|
||||
交货期: v.交货期 ? v.交货期.split(' ')[0] : '',
|
||||
备注: v.备注
|
||||
})
|
||||
if ((this.hasTax === '含税' && Number(v.含税单价)) || (this.hasTax === '未税' && Number(v.未税单价))) { // 筛掉未询到价格的物料
|
||||
merge.push({
|
||||
机床图号: v.机床图号,
|
||||
组号: v.组号,
|
||||
图号: v.图号,
|
||||
名称: v.名称,
|
||||
规格: v.规格,
|
||||
数量: Number(v.数量),
|
||||
计量单位: v.计量单位,
|
||||
单价: this.hasTax === '含税' ? v.含税单价 : v.未税单价,
|
||||
合计: (Number(v.数量) * (this.hasTax === '含税' ? Number(v.含税单价) : Number(v.未税单价))).toFixed(2),
|
||||
交货期: v.交货期 ? v.交货期.split(' ')[0] : '',
|
||||
备注: v.备注
|
||||
})
|
||||
}
|
||||
})
|
||||
let mergeData = []
|
||||
mergeData = groupBy(merge, ['图号', '名称', '规格', '计量单位', '单价', '合计', '交货期', '备注'])
|
||||
mergeData = groupBy(merge, ['图号', '名称', '规格', '计量单位', '单价', '交货期', '备注'])
|
||||
// 放入新数据
|
||||
const tr = []
|
||||
for (let i = 0; i < mergeData.length; i++) {
|
||||
@@ -653,20 +678,25 @@ export default {
|
||||
this.单价组 = []
|
||||
this.交货期组 = []
|
||||
this.hasTax === '含税' ? this.单价是否含税 = 1 : this.单价是否含税 = 0
|
||||
for (let i = 0; i < this.tableData1.length; i++) {
|
||||
this.组件零件流水号组.push(this.tableData1[i].组件零件流水号)
|
||||
this.组件零件基本件流水号组.push(this.tableData1[i].组件零件基本件流水号)
|
||||
this.数量组.push(this.tableData1[i].数量)
|
||||
this.hasTax === '含税' ? this.单价组.push(this.tableData1[i].含税单价) : this.单价组.push(this.tableData1[i].未税单价)
|
||||
this.交货期组.push(this.tableData1[i].交货期)
|
||||
}
|
||||
const inquiryDetailNum_old = [] // 需要转移到新询价单的物料的询价单明细流水号
|
||||
this.tableData1.map(v => {
|
||||
if ((this.hasTax === '含税' && Number(v.含税单价)) || (this.hasTax === '未税' && Number(v.未税单价))) { // 筛掉未询到价格的物料
|
||||
this.组件零件流水号组.push(v.组件零件流水号)
|
||||
this.组件零件基本件流水号组.push(v.组件零件基本件流水号)
|
||||
this.数量组.push(v.数量)
|
||||
this.hasTax === '含税' ? this.单价组.push(v.含税单价) : this.单价组.push(v.未税单价)
|
||||
this.交货期组.push(v.交货期)
|
||||
} else { // 获取未询到价格的物料的询价单明细流水号们
|
||||
inquiryDetailNum_old.push(v.询价单明细流水号)
|
||||
}
|
||||
})
|
||||
if (this.contractNumValue) {
|
||||
this.$confirm('此采购合同将递交审批,递交后该合同不可删除,确认完成编辑?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
doneContract(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组, this.content, this.taxRate * 100).then(response => {
|
||||
doneContract(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组, this.content, this.taxRate * 100, inquiryDetailNum_old).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('合同生成成功')
|
||||
this.reload()
|
||||
|
||||
@@ -166,11 +166,11 @@
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column align="center" label="计划到货时间" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料计划到货时间.split(' ')[0] }}
|
||||
@@ -380,11 +380,11 @@
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column align="center" label="计划到货时间" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料计划到货时间.split(' ')[0] }}
|
||||
|
||||
Reference in New Issue
Block a user