装箱单修改
This commit is contained in:
@@ -174,7 +174,7 @@ export function initPerson() {
|
|||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
||||||
param: '考核部门编号=10=int'
|
param: '考核部门编号=17=int'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ export function deleteFileData(num) {
|
|||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: 'PDM_装箱单_随机技术文件_删除数据',
|
name: 'PDM_装箱单_随机技术文件_删除数据',
|
||||||
param: `序号=${num}`
|
param: `文件编号=${num}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -160,7 +160,7 @@ export function editFileData(name, number, remark, num) {
|
|||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: 'PDM_装箱单_随机技术文件_修改数据',
|
name: 'PDM_装箱单_随机技术文件_修改数据',
|
||||||
param: `名称=${name}&数量=${number}&备注=${remark}&序号=${num}`
|
param: `名称=${name}&数量=${number}&备注=${remark}&文件编号=${num}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -196,24 +196,24 @@ export function deleteSpareData(num) {
|
|||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: 'PDM_装箱单_备件_删除数据',
|
name: 'PDM_装箱单_备件_删除数据',
|
||||||
param: `序号=${num}`
|
param: `备件编号=${num}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function editSpareData(name, specification, number, unit, remark, num) {
|
export function editSpareData(name, specification, unit, number, remark, num) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '2',
|
type: '2',
|
||||||
name: 'PDM_装箱单_备件_修改数据',
|
name: 'PDM_装箱单_备件_修改数据',
|
||||||
param: `名称=${name}&规格=${specification}&数量=${number}&单位=${unit}&备注=${remark}&序号=${num}`
|
param: `名称=${name}&规格=${specification}&数量=${number}&单位=${unit}&备注=${remark}&备件编号=${num}`
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addSpareData(name, specification, number, unit, remark, num) {
|
export function addSpareData(name, specification, unit, number, remark, num) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ export default {
|
|||||||
// 4) 回调函数,必须
|
// 4) 回调函数,必须
|
||||||
Vue.prototype.addTable = function(requestData, param, form, callback) {
|
Vue.prototype.addTable = function(requestData, param, form, callback) {
|
||||||
if (type(callback) === 'function' && type(requestData) === 'function' && type(form) === 'string') {
|
if (type(callback) === 'function' && type(requestData) === 'function' && type(form) === 'string') {
|
||||||
|
console.log(this.$refs[form])
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
requestData(...param).then(response => {
|
requestData(...param).then(response => {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<span style="margin-left: 10px">销售经理</span>
|
<span style="margin-left: 10px">销售经理</span>
|
||||||
<el-input v-model="MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
|
<el-input v-model="MarketingManagerValue" clearable size="small" style="width:200px" readonly placeholder="请选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
|
||||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;tableData2=[];getTableData()">查询收款计划</el-button>
|
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;tableData2=[];getTableData()">查询收款计划</el-button>
|
||||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增收款计划</el-button>
|
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增收款计划</el-button>
|
||||||
<el-badge :value="value" :max="99" class="item">
|
<el-badge :value="value" :max="99" class="item">
|
||||||
@@ -484,8 +484,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import elInput from 'element-ui/packages/input'
|
||||||
import { SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api//MarketingCenter/ContractCapitalManagement'
|
import { SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api//MarketingCenter/ContractCapitalManagement'
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
elInput
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
const validateValue = (rule, value, callback) => {
|
const validateValue = (rule, value, callback) => {
|
||||||
if (value === 0) {
|
if (value === 0) {
|
||||||
|
|||||||
@@ -260,7 +260,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="danger"
|
type="primary"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="editFile(scope.row)">编辑</el-button>
|
@click="editFile(scope.row)">编辑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
@@ -274,7 +274,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-dialog :title="receiptTitle" :visible.sync="receiptVisible" center style="min-height: 200px" width="800px">
|
<el-dialog :title="receiptTitle" :visible.sync="receiptVisible" center style="min-height: 200px" width="800px">
|
||||||
<el-form ref="receiptForm" :rules="rules" :model="receiptForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
<el-form ref="receiptForm" :rules="receiptRules" :model="receiptForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="装箱单号" prop="装箱单号">
|
<el-form-item label="装箱单号" prop="装箱单号">
|
||||||
@@ -321,10 +321,10 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :visible.sync="machineVisible" :title="machineTitle" center style="min-height: 200px" width="400px">
|
<el-dialog :visible.sync="machineVisible" :title="machineTitle" center style="min-height: 200px" width="400px">
|
||||||
<el-form ref="machineForm" :rules="rules" :model="machineForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
<el-form ref="machineForm" :rules="machineRules" :model="machineForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col v-if="machineTitle==='添加主机'" :span="24">
|
<el-col v-if="machineTitle==='添加主机'" :span="24">
|
||||||
<el-form-item label="机床号" prop="装箱单号">
|
<el-form-item label="机床号" prop="机床号">
|
||||||
<el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small">
|
<el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in machine"
|
v-for="item in machine"
|
||||||
@@ -354,7 +354,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :visible.sync="fileVisible" :title="fileTitle" center style="min-height: 200px" width="400px">
|
<el-dialog :visible.sync="fileVisible" :title="fileTitle" center style="min-height: 200px" width="400px">
|
||||||
<el-form ref="machineForm" :rules="rules" :model="fileForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
<el-form ref="fileForm" :rules="filerules" :model="fileForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="名称" prop="名称">
|
<el-form-item label="名称" prop="名称">
|
||||||
@@ -381,7 +381,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :visible.sync="spareVisible" :title="spareTitle" center style="min-height: 200px" width="400px">
|
<el-dialog :visible.sync="spareVisible" :title="spareTitle" center style="min-height: 200px" width="400px">
|
||||||
<el-form ref="machineForm" :rules="rules" :model="spareForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
<el-form ref="spareForm" :rules="spareRule" :model="spareForm" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="名称" prop="名称">
|
<el-form-item label="名称" prop="名称">
|
||||||
@@ -439,13 +439,17 @@ export default {
|
|||||||
spareVisible: false,
|
spareVisible: false,
|
||||||
spareTitle: '',
|
spareTitle: '',
|
||||||
spareForm: {
|
spareForm: {
|
||||||
序号: '',
|
备件编号: '',
|
||||||
名称: '',
|
名称: '',
|
||||||
规格: '',
|
规格: '',
|
||||||
单位: '',
|
单位: '',
|
||||||
备注: '',
|
备注: '',
|
||||||
数量: ''
|
数量: ''
|
||||||
},
|
},
|
||||||
|
spareRule: {
|
||||||
|
名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
||||||
|
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
|
||||||
|
},
|
||||||
spareData: [],
|
spareData: [],
|
||||||
receiptForm: {
|
receiptForm: {
|
||||||
装箱单号: '',
|
装箱单号: '',
|
||||||
@@ -455,12 +459,21 @@ export default {
|
|||||||
联系人: '',
|
联系人: '',
|
||||||
联系方式: ''
|
联系方式: ''
|
||||||
},
|
},
|
||||||
|
receiptRules: {
|
||||||
|
装箱单号: [{ required: true, message: '请输入装箱单号', trigger: 'blur' }],
|
||||||
|
名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
||||||
|
发货节点: [{ required: true, message: '请输入发货节点', trigger: 'blur' }]
|
||||||
|
},
|
||||||
machineForm: {
|
machineForm: {
|
||||||
序号: '',
|
序号: '',
|
||||||
机床号: '',
|
机床号: '',
|
||||||
备注: '',
|
备注: '',
|
||||||
数量: ''
|
数量: ''
|
||||||
},
|
},
|
||||||
|
machineRules: {
|
||||||
|
机床号: [{ required: true, message: '请选择机床号', trigger: 'change' }],
|
||||||
|
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
|
||||||
|
},
|
||||||
rules: {
|
rules: {
|
||||||
},
|
},
|
||||||
machineTableData: [],
|
machineTableData: [],
|
||||||
@@ -469,10 +482,14 @@ export default {
|
|||||||
fileVisible: false,
|
fileVisible: false,
|
||||||
fileTitle: '',
|
fileTitle: '',
|
||||||
fileForm: {
|
fileForm: {
|
||||||
序号: '',
|
文件编号: '',
|
||||||
名称: '',
|
名称: '',
|
||||||
数量: '',
|
数量: '',
|
||||||
备注: ''
|
备注: ''
|
||||||
|
},
|
||||||
|
filerules: {
|
||||||
|
名称: [{ required: true, message: '请输入名称', trigger: 'blur' }],
|
||||||
|
数量: [{ required: true, message: '请输入数量', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -495,6 +512,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
projectValue(val) {
|
projectValue(val) {
|
||||||
|
this.machineTableData = []
|
||||||
|
this.receiptData = []
|
||||||
|
this.spareData = []
|
||||||
|
this.fileData = []
|
||||||
if (val) {
|
if (val) {
|
||||||
this.getMachineSelect(val)
|
this.getMachineSelect(val)
|
||||||
}
|
}
|
||||||
@@ -570,8 +591,11 @@ export default {
|
|||||||
cancel() {
|
cancel() {
|
||||||
this.receiptVisible = false
|
this.receiptVisible = false
|
||||||
this.machineVisible = false
|
this.machineVisible = false
|
||||||
|
this.fileVisible = false
|
||||||
|
this.spareVisible = false
|
||||||
},
|
},
|
||||||
async getMachineData() {
|
async getMachineData() {
|
||||||
|
this.machineTableData = []
|
||||||
const response = await getMachineData(this.receiptNum)
|
const response = await getMachineData(this.receiptNum)
|
||||||
const data = response.data
|
const data = response.data
|
||||||
for (let i = 0; i < data.length; i++) {
|
for (let i = 0; i < data.length; i++) {
|
||||||
@@ -598,11 +622,15 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async submitAddMachine() {
|
async submitAddMachine() {
|
||||||
const response = await addMachineData(this.projectName, this.machineValue, this.machineForm.备注, this.machineForm.数量, this.receiptNum)
|
this.addTable(addMachineData, [this.projectName, this.machineValue, this.machineForm.备注, this.machineForm.数量, this.receiptNum], 'machineForm', function() {
|
||||||
if (response.data[0].result === '1') {
|
|
||||||
this.machineVisible = false
|
this.machineVisible = false
|
||||||
this.getMachineData()
|
this.getMachineData()
|
||||||
}
|
})
|
||||||
|
// const response = await addMachineData(this.projectName, this.machineValue, this.machineForm.备注, this.machineForm.数量, this.receiptNum)
|
||||||
|
// if (response.data[0].result === '1') {
|
||||||
|
// this.machineVisible = false
|
||||||
|
// this.getMachineData()
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
editMachine(row) {
|
editMachine(row) {
|
||||||
this.editForm(row, 'machineForm', function() {
|
this.editForm(row, 'machineForm', function() {
|
||||||
@@ -611,11 +639,15 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async submitEditMachine() {
|
async submitEditMachine() {
|
||||||
const response = await updateMachineData(this.machineForm.序号, this.machineForm.数量, this.machineForm.备注)
|
this.editTable(updateMachineData, [this.machineForm.序号, this.machineForm.数量, this.machineForm.备注], 'machineForm', function() {
|
||||||
if (response.data[0].result === '1') {
|
|
||||||
this.machineVisible = false
|
this.machineVisible = false
|
||||||
this.getMachineData()
|
this.getMachineData()
|
||||||
}
|
})
|
||||||
|
// const response = await updateMachineData(this.machineForm.序号, this.machineForm.数量, this.machineForm.备注)
|
||||||
|
// if (response.data[0].result === '1') {
|
||||||
|
// this.machineVisible = false
|
||||||
|
// this.getMachineData()
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
deleteMachine(row) {
|
deleteMachine(row) {
|
||||||
this.deleteRow(deleteMachineData, row.序号, function() {
|
this.deleteRow(deleteMachineData, row.序号, function() {
|
||||||
@@ -625,20 +657,18 @@ export default {
|
|||||||
async getFileData() {
|
async getFileData() {
|
||||||
const response = await getFileData(this.receiptNum)
|
const response = await getFileData(this.receiptNum)
|
||||||
this.fileData = response.data
|
this.fileData = response.data
|
||||||
console.log(this.fileData)
|
|
||||||
},
|
},
|
||||||
addFile() {
|
addFile() {
|
||||||
this.addForm('machineForm', function() {
|
this.addForm('fileForm', function() {
|
||||||
this.fileTitle = `添加文件`
|
this.fileTitle = `添加文件`
|
||||||
this.fileVisible = true
|
this.fileVisible = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async submitAddFile() {
|
async submitAddFile() {
|
||||||
const response = await addFileData(this.fileForm.名称, this.fileForm.数量, this.fileForm.备注, this.receiptNum)
|
this.addTable(addFileData, [this.fileForm.名称, this.fileForm.数量, this.fileForm.备注, this.receiptNum], 'fileForm', function() {
|
||||||
if (response.data[0].result === '1') {
|
|
||||||
this.fileVisible = false
|
this.fileVisible = false
|
||||||
this.getFileData()
|
this.getFileData()
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
editFile(row) {
|
editFile(row) {
|
||||||
this.editForm(row, 'fileForm', function() {
|
this.editForm(row, 'fileForm', function() {
|
||||||
@@ -647,14 +677,13 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async submitEditFile() {
|
async submitEditFile() {
|
||||||
const response = await editFileData(this.fileForm.名称, this.fileForm.数量, this.fileForm.备注, this.fileForm.序号)
|
this.editTable(editFileData, [this.fileForm.名称, this.fileForm.数量, this.fileForm.备注, this.fileForm.文件编号], 'fileForm', function() {
|
||||||
if (response.data[0].result === '1') {
|
|
||||||
this.fileVisible = false
|
this.fileVisible = false
|
||||||
this.getFileData()
|
this.getFileData()
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
deleteFile(row) {
|
deleteFile(row) {
|
||||||
this.deleteRow(deleteFileData, row.序号, function() {
|
this.deleteRow(deleteFileData, row.文件编号, function() {
|
||||||
this.getFileData()
|
this.getFileData()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -669,11 +698,15 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async submitAddSpare() {
|
async submitAddSpare() {
|
||||||
const response = await addSpareData(this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.receiptNum)
|
this.addTable(addSpareData, [this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.receiptNum], 'spareForm', function() {
|
||||||
if (response.data[0].result === '1') {
|
|
||||||
this.spareVisible = false
|
this.spareVisible = false
|
||||||
this.getSpareData()
|
this.getSpareData()
|
||||||
}
|
})
|
||||||
|
// const response = await addSpareData(this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.receiptNum)
|
||||||
|
// if (response.data[0].result === '1') {
|
||||||
|
// this.spareVisible = false
|
||||||
|
// this.getSpareData()
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
editSpare(row) {
|
editSpare(row) {
|
||||||
this.editForm(row, 'spareForm', function() {
|
this.editForm(row, 'spareForm', function() {
|
||||||
@@ -682,14 +715,18 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async submitEditSpare() {
|
async submitEditSpare() {
|
||||||
const response = await editSpareData(this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.fileForm.序号)
|
this.editTable(editSpareData, [this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.spareForm.备件编号], 'spareForm', function() {
|
||||||
if (response.data[0].result === '1') {
|
|
||||||
this.spareVisible = false
|
this.spareVisible = false
|
||||||
this.getSpareData()
|
this.getSpareData()
|
||||||
}
|
})
|
||||||
|
// const response = await editSpareData(this.spareForm.名称, this.spareForm.规格, this.spareForm.单位, this.spareForm.数量, this.spareForm.备注, this.spareForm.备件编号)
|
||||||
|
// if (response.data[0].result === '1') {
|
||||||
|
// this.spareVisible = false
|
||||||
|
// this.getSpareData()
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
deleteSpare(row) {
|
deleteSpare(row) {
|
||||||
this.deleteRow(deleteSpareData, row.序号, function() {
|
this.deleteRow(deleteSpareData, row.备件编号, function() {
|
||||||
this.getSpareData()
|
this.getSpareData()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,25 +22,24 @@
|
|||||||
<el-upload :on-remove="handleRemove" :file-list="itemFile" action=""/>
|
<el-upload :on-remove="handleRemove" :file-list="itemFile" action=""/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="worksheet.length !== 0" style="float: right;margin: 20px 0">
|
<div v-if="worksheet.length !== 0" style="float: right;margin: 20px 0">
|
||||||
<el-button icon="el-icon-upload2" type="primary" size="small" @click="basicPartsToSQL">导入到数据库</el-button>
|
<el-button :disabled="disabled" icon="el-icon-upload2" type="primary" size="small" @click="basicPartsToSQL">导入到数据库</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<specification-data ref="specificationData" :groups-names="groupsNames" :machine-names="machineNames" :project-name="projectName" @machineChange="machineChange"/>
|
<specification-data ref="specificationData" :groups-names="groupsNames" :machine-names="machineNames" :project-name="projectName" @machineChange="machineChange"/>
|
||||||
<el-upload
|
<!--<el-upload-->
|
||||||
class="upload-demo"
|
<!--class="upload-demo"-->
|
||||||
drag
|
<!--drag-->
|
||||||
action="http://localhost:8410/submit/uploadImg.ashx?InvoiceNum=1"
|
<!--action="http://localhost:8410/submit/uploadImg.ashx?InvoiceNum=1"-->
|
||||||
multiple>
|
<!--multiple>-->
|
||||||
<i class="el-icon-upload"/>
|
<!--<i class="el-icon-upload"/>-->
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
<!--<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>-->
|
||||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
<!--<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>-->
|
||||||
</el-upload>
|
<!--</el-upload>-->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
/* eslint-disable */
|
|
||||||
import UploadExcelComponent from './UploadExcel/index.vue'
|
import UploadExcelComponent from './UploadExcel/index.vue'
|
||||||
import specificationData from './specificationData'
|
import specificationData from './specificationData'
|
||||||
import { sleep } from '../../../utils/tool'
|
import { sleep } from '../../../utils/tool'
|
||||||
@@ -58,7 +57,8 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
groupsNames: [],
|
groupsNames: [],
|
||||||
machineNames: [],
|
machineNames: [],
|
||||||
err: 0
|
err: 0,
|
||||||
|
disabled: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -88,6 +88,10 @@ export default {
|
|||||||
this.fetchData()
|
this.fetchData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async test() {
|
||||||
|
await sleep(10000)
|
||||||
|
console.log(1)
|
||||||
|
},
|
||||||
fetchData() {
|
fetchData() {
|
||||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||||
},
|
},
|
||||||
@@ -112,7 +116,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selected(data) { // 选择需要导入的文件
|
async selected(data) { // 选择需要导入的文件
|
||||||
this.worksheet = data.worksheet // 获取每个多选文件的表格坐标及值
|
this.worksheet = data.worksheet // 获取每个多选文件的表格坐标及值
|
||||||
this.itemFile = data.itemFile
|
this.itemFile = data.itemFile
|
||||||
},
|
},
|
||||||
@@ -131,6 +135,7 @@ export default {
|
|||||||
async basicPartsToSQL() {
|
async basicPartsToSQL() {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
this.dispatch = true
|
||||||
this.err = 0
|
this.err = 0
|
||||||
for (let j = this.worksheet.length - 1; j >= 0; j--) {
|
for (let j = this.worksheet.length - 1; j >= 0; j--) {
|
||||||
let establishment,
|
let establishment,
|
||||||
@@ -159,6 +164,7 @@ export default {
|
|||||||
if (res[0].Column1 === 0) {
|
if (res[0].Column1 === 0) {
|
||||||
this.$notify.error(`${this.worksheet[j].F2.v}机床不存在,请确认文件是否正确`)
|
this.$notify.error(`${this.worksheet[j].F2.v}机床不存在,请确认文件是否正确`)
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
this.disabled = false
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
|
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
|
||||||
@@ -189,9 +195,11 @@ export default {
|
|||||||
break
|
break
|
||||||
} else {
|
} else {
|
||||||
if (machineNum && groupNum) {
|
if (machineNum && groupNum) {
|
||||||
|
await sleep(50)
|
||||||
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||||
} else {
|
} else {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
this.disabled = false
|
||||||
this.$notify.error(`请确认导入文件是否正确`)
|
this.$notify.error(`请确认导入文件是否正确`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -213,14 +221,12 @@ export default {
|
|||||||
async insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) {
|
async insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) {
|
||||||
try {
|
try {
|
||||||
if (groupNum.indexOf('MX') > -1) {
|
if (groupNum.indexOf('MX') > -1) {
|
||||||
await sleep(10)
|
|
||||||
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||||
const res = response.data
|
const res = response.data
|
||||||
if (res[0].result === '0') {
|
if (res[0].result === '0') {
|
||||||
this.$notify.error(`${drawingNum}导入失败`)
|
this.$notify.error(`${drawingNum}导入失败`)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
await sleep(10)
|
|
||||||
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||||
const res = response.data
|
const res = response.data
|
||||||
if (res[0].result === '0') {
|
if (res[0].result === '0') {
|
||||||
|
|||||||
@@ -133,7 +133,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="零件类型">
|
<el-table-column align="center" label="零件类型">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.标准件类型 }}
|
{{ scope.row.零件类型 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="供货商">
|
<el-table-column align="center" label="供货商">
|
||||||
@@ -273,14 +273,14 @@ export default {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const type = this.groupName.indexOf('WG') > -1 ? 2 : 1
|
const type = this.groupName.indexOf('WG') > -1 ? 2 : 1
|
||||||
console.log(type)
|
|
||||||
this.loadingWB = true
|
this.loadingWB = true
|
||||||
purchasePartsData(this.groupValue, type, this.pageCurrentWB, this.pageSizeWB).then(response => {
|
purchasePartsData(this.groupValue, type, this.pageCurrentWB, this.pageSizeWB).then(response => {
|
||||||
this.loadingWB = false
|
this.loadingWB = false
|
||||||
const data = response.data
|
const data = response.data
|
||||||
this.totalWB = data.total
|
this.totalWB = data.total
|
||||||
this.tableDataWB = data.rows.map(item => {
|
this.tableDataWB = data.rows.map(item => {
|
||||||
item.标准件类型 = item.标准件类型 === '1' ? '外购件' : '标准件'
|
console.log(item)
|
||||||
|
item.零件类型 = item.零件类型 === '2' ? '外购件' : '标准件'
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user