This commit is contained in:
bryan sun
2020-01-05 10:56:34 +08:00
10 changed files with 222 additions and 31 deletions

View File

@@ -35,7 +35,7 @@ export function initProcessNumber() {
}
})
}
// 获取组号
// 加序
export function addProcess(NUM, NUM1, NUM2, NUM3) {
return request({
url: '',
@@ -47,6 +47,18 @@ export function addProcess(NUM, NUM1, NUM2, NUM3) {
}
})
}
// 删除加序
export function deleteProcess(NUM) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间管理_自制件插序_删除数据',
param: 'ID=' + NUM
}
})
}
export function getTable(checkbox_Machine, Machine, checkbox_Group, Group, checkbox_number, number, k, m, pageCurrent, pageSize) {
return request({
url: '',

View File

@@ -134,6 +134,18 @@ export function editList(num, a, b, c) {
}
})
}
// 编辑
export function EditNumber(num, num1) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_生产计划下达_修改投产数量',
param: '组件零件基本件流水号=' + num + '=int&数量=' + num1
}
})
}
// 打回档案
export function dele(num, a, b) {
return request({

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() {
return request({
url: '',
@@ -31,6 +41,17 @@ export function initDepartmentName() {
}
})
}
export function yanzheng(num) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '库存管理_供货商验证_查询数据',
param: '供货商=' + num
}
})
}
export function initMaterialCategory(check, DepartmentValue) {
return request({
url: '',

View File

@@ -1,7 +1,6 @@
<template>
<div class="app-container">
<el-card>
<el-button :disabled="isShow" type="info" size="small" style="margin: 0px 180px;float: right" @click="EditData">补录完成日期</el-button>
<el-select v-model="Machine" filterable clearable size="small" style="margin:0px 10px 0px 10px;width: 185px;" placeholder="机床号" @change="getGroup">
<el-option
v-for="item in Machines"
@@ -22,6 +21,7 @@
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 170px;margin:0px 10px;"/>
<el-button type="success" class="el-icon-search" size="small" style="margin: 0px 10px;" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button>
<el-button type="primary" class="el-icon-plus" size="small" style="margin: 0px 10px;" @click="addTableData()">加序</el-button>
<el-button type="danger" class="el-icon-delete" size="small" style="margin: 0px 10px;" @click="deleteProcess()">删除加序</el-button>
</el-card>
<el-row>
<el-col style="width: 550px">
@@ -35,7 +35,8 @@
highlight-current-row
empty-text=" "
border
@current-change="getRow">
@current-change="getRow"
@row-click="getID">
<el-table-column align="center" label="序号" width="70">
<template slot-scope="scope">
{{ scope.row.工序顺序 }}
@@ -78,7 +79,7 @@
<el-card>
<el-table
:data="tableData"
:row-class-name="tableRowClassName"
:row-class-name="tableRowClassName1"
loading="loading"
class="table"
highlight-current-row
@@ -247,7 +248,7 @@
</template>
<script>
import { getMachines, getGroups, getTable, gettabledata1, getTree, fn, getTable8, submitEdit, initProcessNumber, addProcess } from '@/api/ManufacturingCenter/AddingOrder'
import { getMachines, getGroups, getTable, gettabledata1, getTree, fn, getTable8, submitEdit, initProcessNumber, addProcess, deleteProcess } from '@/api/ManufacturingCenter/AddingOrder'
import Cookie from 'js-cookie'
export default {
@@ -267,6 +268,7 @@ export default {
pageCurrent: 1,
pageSize: 100,
total: 0,
Id: '',
ProcessNumber: [], // 工艺
tableData1: [], // 工序表
radio: '',
@@ -318,6 +320,47 @@ export default {
addTableData() {
this.dialogFormVisible2 = true
},
deleteProcess() {
this.$confirm('确定删除该合同?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (this.Id !== 0) {
deleteProcess(this.Id).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.tableData1 = []
gettabledata1(this.process).then(response => {
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.tableData1.push({
ID: response.data[i].ID,
工序顺序: response.data[i].工序顺序,
工艺名称: response.data[i].工艺名称,
序间质检: response.data[i].质检结果,
排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '',
完成日期: response.data[i].工序完成日期 ? response.data[i].工序完成日期.split(' ')[0] : '',
操作者: response.data[i].操作者,
不合格数量: response.data[i].不合格数量,
质检数量: response.data[i].数量,
工序流水号: response.data[i].工序流水号
})
}
}
})
} else { this.$message.error('删除失败') }
})
} else {
this.$message.error('只能删除加序')
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
getMachine() {
if (Cookie.get('machineValue') !== undefined) {
this.Machine = ''
@@ -400,6 +443,7 @@ export default {
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData.push({
工艺计划流水号: response.data.rows[i].工艺计划流水号,
考核状态: response.data.rows[i].考核状态,
序号: response.data.rows[i].序号,
跟单号: response.data.rows[i].跟单号,
零件图号: response.data.rows[i].零件图号,
@@ -415,7 +459,11 @@ export default {
this.total = response.data.total
this.loading = false
})
}, // 获取工序表
},
getID(row) {
this.Id = row.ID
},
// 获取工序表
getCurrentRow(row) {
this.completeTime = ''
this.dateOfProduction = ''
@@ -428,6 +476,7 @@ export default {
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.tableData1.push({
ID: response.data[i].ID,
工序顺序: response.data[i].工序顺序,
工艺名称: response.data[i].工艺名称,
序间质检: response.data[i].质检结果,
@@ -450,6 +499,7 @@ export default {
this.form.完成时间 = ''
},
getRow(row) {
this.Id = row.ID
this.completeTime = row.完成日期
this.dateOfProduction = row.排产日期
this.processSerialNumber = row.工序流水号
@@ -510,6 +560,25 @@ export default {
if (response.data[0].result === '1') {
this.$message.success('加序成功')
this.dialogFormVisible2 = false
this.tableData1 = []
gettabledata1(this.process).then(response => {
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.tableData1.push({
ID: response.data[i].ID,
工序顺序: response.data[i].工序顺序,
工艺名称: response.data[i].工艺名称,
序间质检: response.data[i].质检结果,
排产日期: response.data[i].排产时间 ? response.data[i].排产时间.split(' ')[0] : '',
完成日期: response.data[i].工序完成日期 ? response.data[i].工序完成日期.split(' ')[0] : '',
操作者: response.data[i].操作者,
不合格数量: response.data[i].不合格数量,
质检数量: response.data[i].数量,
工序流水号: response.data[i].工序流水号
})
}
}
})
} else {
this.$message.error('加序失败')
}
@@ -526,6 +595,13 @@ export default {
this.dialogFormVisible = false
this.getCurrentRow(this.row2)
},
// 考核状态变色
tableRowClassName1({ row, rowIndex }) {
row.index = rowIndex
if (parseInt(row.考核状态) > 6) {
return 'CompleteColor'
}
},
// 完成日期变色
tableRowClassName({ row, rowIndex }) {
row.index = rowIndex

View File

@@ -137,6 +137,11 @@
{{ scope.row.未投产数量 }}
</template>
</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">
<template slot-scope="scope">
{{ scope.row.零件类型名称 }}
@@ -150,6 +155,11 @@
type="primary"
plain
@click="handleEdit(scope.$index, scope.row, 'form')">分批投产</el-button>
<el-button
size="mini"
type="primary"
plain
@click="handleEditNumber(scope.$index, scope.row)">更改数量</el-button>
</template>
</el-table-column>
</el-table>
@@ -255,7 +265,7 @@
</div>
</el-card>
<el-dialog :visible.sync="dialogFormVisible2" title="打回档案" center width="28%">
<el-dialog :visible.sync="dialogFormVisible2" title="打回档案" center width="200px">
<el-form ref="form1" :model="form1" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="打回原因" prop="reason">
<el-input v-model="form1.reason" size="small" />
@@ -267,6 +277,18 @@
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible3" title="更改投产数量" center width="300px">
<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" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="callOff2('form3')">取消</el-button>
<el-button size="small" type="primary" @click="EditNumber('form3')"> </el-button>
</div>
</el-dialog>
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center width="450px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="零件图号" prop="PDnumber">
@@ -321,7 +343,7 @@
</template>
<script>
import { getEntryNameValue, getToolNum, getNum, getTable, production, getTable1, revisionBatch, editList, dele, production2, production20, production10, edit } from '@/api/ManufacturingCenter/InitialProduction'
import { getEntryNameValue, getToolNum, getNum, getTable, production, getTable1, revisionBatch, editList, dele, production2, production20, production10, edit, EditNumber } from '@/api/ManufacturingCenter/InitialProduction'
import { mapGetters } from 'vuex'
import Cookie from 'js-cookie'
@@ -374,16 +396,24 @@ export default {
form1: {
reason: ''
},
form3: {
投产数量: ''
},
rules: { // 表单验证规则
batchQuantity: [{ required: true, message: '请输入批次数量', trigger: 'blur' }],
// startDate_F: [{ required: true, message: '请选择加工开始时间', trigger: 'change' }],
endDate_F: [{ required: true, message: '请选择加工结束时间', trigger: 'change' }],
reason: [{ required: true, message: '请输入打回原因', trigger: 'blur' }]
},
rules3: { // 表单验证规则
投产数量: [{ required: true, message: '请输入投产数量', trigger: 'blur' }]
},
// value1: '',
result: 0,
dialogFormVisible1: false,
dialogFormVisible2: false,
dialogFormVisible3: false,
NumberValue: '',
date: '',
a: false,
multipleSelection: [],
@@ -578,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].材料流水号,
checked_dailiao: false,
@@ -608,6 +639,23 @@ export default {
this.multipleSelection = val
console.log(this.multipleSelection, 1111)
},
handleEditNumber(index, row) {
this.dialogFormVisible3 = true
console.log(row, 123)
this.NumberValue = row.组件零件基本件流水号
this.form3.投产数量 = row.投产总数量
},
EditNumber() {
EditNumber(this.NumberValue, this.form3.投产数量).then(response => {
if (response.data[0].result === '1') {
this.getTable()
this.dialogFormVisible3 = false
this.$message.success('更改成功')
} else {
this.$message.error('更改失败')
}
})
},
// 打开分批投产
handleEdit(index, row, formName) {
this.temp = 1
@@ -791,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].材料流水号,
checked_dailiao: false,
@@ -1140,6 +1189,10 @@ export default {
this.dialogFormVisible2 = false
this.$refs[formName].resetFields()
},
callOff2(formName) {
this.dialogFormVisible3 = false
this.$refs[formName].resetFields()
},
// 分页
handleSizeChange(val) {
this.pageSize = val

View File

@@ -3390,7 +3390,7 @@ export default {
method: 'post',
data: {
type: '3',
name: `exec 项目计划管理_项目详细计划_查询数据 @机床流水号=${this.machineValue1}, @计划类型=4`
name: `exec 项目计划管理_项目详细计划_查询数据1 @机床流水号=${this.machineValue1}, @计划类型=4`
}
}).then(res => {
this.tableDataDiv10 = res.data

View File

@@ -64,7 +64,7 @@
</el-select>
</el-col>
<el-col v-show="materielValue==='1'||materielValue==='6'||materielValue==='7'||materielValue==='8'" :span="12" style="width: 60%">
<el-col v-show="materielValue==='1'||materielValue==='6'||materielValue==='7'||materielValue==='8'" :span="12">
<span >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</span>
<el-input-number v-model="diameter" size="small" controls-position="right" style="width:100px;margin-top: 7px"/>
<span>长度:</span>
@@ -74,7 +74,7 @@
<el-input v-model="weight" style="width:150px" size="small" placeholder="重量">
<el-button slot="append" icon="el-icon-cjn-09" @click="saveWeight"/>
</el-input>
<el-button style="margin-left: 10px;" type="success" size="small" @click="insertThestring()">合并生产</el-button>
<!--<el-button style="margin-left: 10px;" type="success" size="small" @click="insertThestring()">合并生产</el-button>-->
</el-col>
<el-col v-show="materielValue==='2'||materielValue==='9'||materielValue==='10'||materielValue==='11'" :span="20">
@@ -195,7 +195,7 @@
</el-card>
<el-card>
<el-row>
<el-col style="width: 180px;height: 683px;overflow: auto">
<el-col :span="4" style="height: 683px;overflow: auto">
<el-tree
:data="departmentData"
:props="defaultProps"
@@ -205,8 +205,8 @@
default-expand-all
@node-click="onClick"/>
</el-col>
<el-col style="width: 970px;height: 700px">
<el-table v-loading="loading0" :data="tableData" class="processTable" border style="width: 967px" height="683px" size="mini">
<el-col :span="20" style="height: 700px">
<el-table v-loading="loading0" :data="tableData" class="processTable" border style="width: 100%" height="683px" size="mini">
<el-table-column prop="num" label="序号" width="45" align="center" type="index"/>
<el-table-column prop="name" label="工艺名称" width="180" align="center">
<template slot-scope="scope">
@@ -223,13 +223,15 @@
<el-input v-direction="{x: 1, y: scope.$index}" v-model="scope.row.准结定额工时" style="width:100%" placeholder="" @change="readyChange(scope.row)"/>
</template>
</el-table-column>
<el-table-column prop="request" label="工艺要求" align="center" width="290">
<el-table-column prop="request" label="工艺要求" align="center">
<template slot-scope="scope">
<el-input
v-direction="{x: 2, y: scope.$index}"
v-model="scope.row.工艺要求"
:rows="1"
:fetch-suggestions="querySearch"
placeholder=""
type="textarea"
style="width: 100%"
@focus="focusRequest(scope.row)"
@blur="blurRequest(scope.row)"

View File

@@ -2,7 +2,7 @@
<div class="app-container">
<el-card>
<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
v-for="item in machineTool"
:key="item.value"

View File

@@ -566,7 +566,8 @@ import {
getMaterial,
searchmateria5,
Dahui,
Tongguo
Tongguo,
yanzheng
} from '@/api/PurchasingCenter/MaterialManagement'
import { mapGetters } from 'vuex'
@@ -755,13 +756,20 @@ export default {
AddGonghuoshang(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
AddGonghuoshang(this.form3.供货商名称).then(response => {
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.dialogFormVisible3 = false
yanzheng(this.form3.供货商名称).then(response => {
if (response.data[0].Column1 === 0) {
AddGonghuoshang(this.form3.供货商名称).then(response => {
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.dialogFormVisible3 = false
this.getGonghuoshang()
} else {
this.dialogFormVisible3 = false
this.$message.error('添加失败')
}
})
} else {
this.dialogFormVisible3 = false
this.$message.error('添加失败')
this.$message.error('该供货商已存在')
}
})
}
@@ -836,13 +844,24 @@ export default {
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', this.form.物料类别流水号)
},
handleEdit(row) {
this.title = '编辑'
this.supplierValue1 = ''
this.MaterialCategory1 = []
this.MaterialVariety1 = []
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.物料来源流水号
parseInt(row.供货商流水号) === 721 ? this.form.GonghuoshangValue = 1 : this.form.GonghuoshangValue = parseInt(row.供货商流水号)
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory1')
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', row.物料类别流水号)
this.editForm(row, 'form', [this.title = '编辑', this.dialogFormVisible1 = true])
},
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() {

View File

@@ -179,8 +179,6 @@ export default {
componentNum,
groupNum,
contractNum,
pageNum,
totalNum,
drawingNum,
name,
type,
@@ -206,12 +204,10 @@ export default {
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''
this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = ''
this.worksheet[j].P1 ? date = this.worksheet[j].P1.v : date = ''
this.worksheet[j].Q1 ? pageNum = parseInt(this.worksheet[j].Q1.v.replace(/[^0-9]/ig, '')) : pageNum = ''
this.worksheet[j].C2 ? machineName = this.worksheet[j].C2.v : machineName = ''
this.worksheet[j].F2 ? machineNum = this.worksheet[j].F2.v : machineNum = ''
this.worksheet[j].J2 ? componentName = this.worksheet[j].J2.v : componentName = ''
this.worksheet[j].P2 ? componentNum = this.worksheet[j].P2.v : componentNum = ''
this.worksheet[j].Q2 ? totalNum = parseInt(this.worksheet[j].Q2.v.replace(/[^0-9]/ig, '')) : totalNum = ''
this.worksheet[j].R2 ? contractNum = this.worksheet[j].R2.v : contractNum = ''
this.worksheet[j].M2 ? groupNum = this.worksheet[j].M2.v : groupNum = ''
for (let i = 0; i < 999; i++) {
@@ -230,7 +226,7 @@ export default {
} else {
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, 1, 1, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
} else {
this.loading = false
this.disabled = false
@@ -260,7 +256,7 @@ 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) {
try {
if (groupNum.indexOf('MX') > -1) {
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, 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, this.group, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data
console.log(res)
if (res.hasOwnProperty('output') === false) {
@@ -276,7 +272,7 @@ export default {
}
}
} else {
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, 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, this.group, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data
if (res.hasOwnProperty('output') === false) {
if (res[0].result === '0') {