This commit is contained in:
zhangdingyu
2020-01-04 09:48:51 +08:00
5 changed files with 34 additions and 6 deletions

View File

@@ -21,6 +21,16 @@ export function AddGonghuoshang(num) {
} }
}) })
} }
export function Add(num) {
return request({
url: '',
method: 'post',
data: {
type: '4',
name: `insert into dbo.库存管理_供货商 (供货商) VALUES(\'${num}\')`
}
})
}
export function initDepartmentName() { export function initDepartmentName() {
return request({ return request({
url: '', url: '',

View File

@@ -137,6 +137,11 @@
{{ scope.row.未投产数量 }} {{ scope.row.未投产数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件备注" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.零件备注 }}
</template>
</el-table-column>
<el-table-column label="零件类型" prop="零件类型名称" align="center" width="120"> <el-table-column label="零件类型" prop="零件类型名称" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件类型名称 }} {{ scope.row.零件类型名称 }}
@@ -603,6 +608,7 @@ export default {
组件零件基本件流水号: response.data.rows[i].组件零件基本件流水号, 组件零件基本件流水号: response.data.rows[i].组件零件基本件流水号,
投产类型流水号: response.data.rows[i].投产类型流水号, 投产类型流水号: response.data.rows[i].投产类型流水号,
数据类型: response.data.rows[i].数据类型, 数据类型: response.data.rows[i].数据类型,
零件备注: response.data.rows[i].零件备注,
规格: response.data.rows[i].规格, 规格: response.data.rows[i].规格,
材料流水号: response.data.rows[i].材料流水号, 材料流水号: response.data.rows[i].材料流水号,
checked_dailiao: false, checked_dailiao: false,
@@ -833,6 +839,7 @@ export default {
组件零件基本件流水号: response.data.rows[i].组件零件基本件流水号, 组件零件基本件流水号: response.data.rows[i].组件零件基本件流水号,
投产类型流水号: response.data.rows[i].投产类型流水号, 投产类型流水号: response.data.rows[i].投产类型流水号,
数据类型: response.data.rows[i].数据类型, 数据类型: response.data.rows[i].数据类型,
零件备注: response.data.rows[i].零件备注,
规格: response.data.rows[i].规格, 规格: response.data.rows[i].规格,
材料流水号: response.data.rows[i].材料流水号, 材料流水号: response.data.rows[i].材料流水号,
checked_dailiao: false, checked_dailiao: false,

View File

@@ -2,7 +2,7 @@
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<el-row> <el-row>
<el-select v-model="machineToolValue" placeholder="机床号" size="small" clearable style="width: 150px;margin: 10px 10px 0px 10px" @change="searchGroupList"> <el-select v-model="machineToolValue" placeholder="机床号" size="small" filterable clearable style="width: 150px;margin: 10px 10px 0px 10px" @change="searchGroupList">
<el-option <el-option
v-for="item in machineTool" v-for="item in machineTool"
:key="item.value" :key="item.value"

View File

@@ -837,13 +837,24 @@ export default {
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', this.form.物料类别流水号) this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', this.form.物料类别流水号)
}, },
handleEdit(row) { handleEdit(row) {
this.title = '编辑'
this.supplierValue1 = '' this.supplierValue1 = ''
this.MaterialCategory1 = [] this.MaterialCategory1 = []
this.MaterialVariety1 = [] this.MaterialVariety1 = []
this.supplierValue1 = row.供货商流水号 this.supplierValue1 = row.供货商流水号
this.dialogFormVisible1 = true
this.form.物料流水号 = row.物料流水号
this.form.物料类别流水号 = row.物料类别流水号
this.form.物料品种流水号 = row.物料品种流水号
this.form.物料名称 = row.物料名称
this.form.物料全名 = row.物料全名
this.form.物料规格 = row.物料规格
this.form.物料型号 = row.物料型号
this.form.计量单位流水号 = row.计量单位流水号
this.form.物料来源流水号 = row.物料来源流水号
this.form.GonghuoshangValue = parseInt(row.供货商流水号)
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory1') this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory1')
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', row.物料类别流水号) this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', row.物料类别流水号)
this.editForm(row, 'form', [this.title = '编辑', this.dialogFormVisible1 = true])
}, },
submitEdit() { submitEdit() {
this.editTable(editData, [this.form.物料流水号, this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.form.GonghuoshangValue], 'form', function() { this.editTable(editData, [this.form.物料流水号, this.form.物料品种流水号, this.form.物料名称, this.form.物料全名, this.form.物料规格, this.form.物料型号, this.form.计量单位流水号, this.form.物料来源流水号, this.form.GonghuoshangValue], 'form', function() {

View File

@@ -226,7 +226,7 @@ export default {
} else { } else {
if (machineNum && groupNum) { if (machineNum && groupNum) {
await sleep(50) await sleep(50)
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, 1, 1, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
} else { } else {
this.loading = false this.loading = false
this.disabled = false this.disabled = false
@@ -253,10 +253,10 @@ export default {
console.log(`导入数据错误${e}`) console.log(`导入数据错误${e}`)
} }
}, },
async insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, 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) {
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data const res = response.data
console.log(res) console.log(res)
if (res.hasOwnProperty('output') === false) { if (res.hasOwnProperty('output') === false) {
@@ -272,7 +272,7 @@ export default {
} }
} }
} else { } else {
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data const res = response.data
if (res.hasOwnProperty('output') === false) { if (res.hasOwnProperty('output') === false) {
if (res[0].result === '0') { if (res[0].result === '0') {