color
This commit is contained in:
22
src/App.vue
22
src/App.vue
@@ -1,11 +1,29 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view/>
|
||||
<router-view v-if="isRouterAlive"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'App'
|
||||
name: 'App',
|
||||
provide() {
|
||||
return {
|
||||
reload: this.reload
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isRouterAlive: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reload() {
|
||||
this.isRouterAlive = false
|
||||
this.$nextTick(function() {
|
||||
this.isRouterAlive = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -95,26 +95,26 @@ export function searchDetail(num) {
|
||||
})
|
||||
}
|
||||
// 增加组件工艺
|
||||
export function submitAdd(machineNumberValue, SerialNumber, Group, AssemblyTask) {
|
||||
export function submitAdd(machineNumberValue, SerialNumber, Group, AssemblyTask, GroupNumberValue1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_组件工艺_增加数据',
|
||||
param: '机床流水号=' + machineNumberValue + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask
|
||||
param: '机床流水号=' + machineNumberValue + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask + '&组件流水号=' + GroupNumberValue1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑组件工艺
|
||||
export function submitEdit(GroupProcessNumber, SerialNumber, Group, AssemblyTask) {
|
||||
export function submitEdit(GroupProcessNumber, SerialNumber, Group, AssemblyTask, GroupNumberValue1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_组件工艺_编辑数据',
|
||||
param: '组件工艺流水号=' + GroupProcessNumber + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask
|
||||
param: '组件工艺流水号=' + GroupProcessNumber + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask + '&组件流水号=' + GroupNumberValue1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
240
src/api/Assembly/TypicalAssemblyMaintenance.js
Normal file
240
src/api/Assembly/TypicalAssemblyMaintenance.js
Normal file
@@ -0,0 +1,240 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 初始化 工艺员A
|
||||
export function initCraftmen() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
|
||||
param: '考核部门编号=17'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化 工序分类
|
||||
export function initprocessNameClass() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_工序分类_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化 机床分类
|
||||
export function initmachineType() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_机床分类_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询机床编号
|
||||
export function SearchMachine(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_典型机床_查询数据',
|
||||
param: '机床分类流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询工序名称
|
||||
export function initProcessName(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_工序名称_查询数据',
|
||||
param: '工序分类流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询组件
|
||||
export function searchGroup(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_组件名称_查询数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询组件工艺
|
||||
export function searchDetail(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_组件工艺_查询数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 增加组件工艺
|
||||
export function submitAdd(machineNumberValue, SerialNumber, Group, AssemblyTask, GroupNumberValue1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_组件工艺_增加数据',
|
||||
param: '机床流水号=' + machineNumberValue + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask + '&组件流水号=' + GroupNumberValue1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑组件工艺
|
||||
export function submitEdit(GroupProcessNumber, SerialNumber, Group, AssemblyTask, GroupNumberValue1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_组件工艺_编辑数据',
|
||||
param: '组件工艺流水号=' + GroupProcessNumber + '&序号=' + SerialNumber + '&组号=' + Group + '&装配任务=' + AssemblyTask + '&组件流水号=' + GroupNumberValue1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除组件工艺
|
||||
export function deleteGroup(GroupProcessNumber) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_组件工艺_删除数据',
|
||||
param: '组件工艺流水号=' + GroupProcessNumber
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询工序
|
||||
export function searchProcess(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间装配管理_装配工序_查询数据',
|
||||
param: '组件工艺流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 增加工序
|
||||
export function insertOne(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序_增加数据',
|
||||
param: '组件工艺流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑工序
|
||||
export function update(num, num1, num2, num3, num4) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序_编辑数据',
|
||||
param: '装配工序流水号=' + num + '&序号=' + num1 + '&工序名称=' + num2 + '&工艺内容及装配具体要求=' + num3 + '&质检=' + num4
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑工序1
|
||||
export function update1(num, num1, num2, num3) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序_编辑数据',
|
||||
param: '装配工序流水号=' + num + '&序号=' + num1 + '&工序名称=' + num2 + '&工艺内容及装配具体要求=' + num3
|
||||
}
|
||||
})
|
||||
}
|
||||
// 编辑工时
|
||||
export function update2(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序工时_编辑数据',
|
||||
param: '装配工序流水号=' + num + '&工艺工时=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
// 保存
|
||||
export function saveApprove(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_机床工艺_定额完成',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 上移
|
||||
export function upOne(num, num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序_上移',
|
||||
param: '装配工序流水号=' + num + '&组件工艺流水号=' + num1 + '&工序顺序=' + num2
|
||||
}
|
||||
})
|
||||
}
|
||||
// 下移
|
||||
export function downOne(num, num1, num2) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序_下移',
|
||||
param: '装配工序流水号=' + num + '&组件工艺流水号=' + num1 + '&工序顺序=' + num2
|
||||
}
|
||||
})
|
||||
}
|
||||
// 删除工序
|
||||
export function deleteOne(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_装配工序_删除数据',
|
||||
param: '装配工序流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 工艺删除
|
||||
export function deleteTable(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间装配管理_机床工艺_删除数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -20,7 +20,7 @@ export function searchTable1(pageCurrent, pageSize, check1, start, end, check2,
|
||||
data: {
|
||||
type: '1',
|
||||
name: '采购管理_请款表_查询数据',
|
||||
param: '时间段_check=' + check1 + '&开始时间=' + start + '&结束时间=' + end + '&合同号_check=' + check2 + '&采购合同编号=' + num1 + '&采购员_check=' + check3 + '&采购员姓名=' + name1 + '&供应商_check=' + check4 + '&供应商名称=' + name2,
|
||||
param: '时间段_check=' + check1 + '&开始时间=' + start + '&结束时间=' + end + '&合同号_check=' + check2 + '&采购合同编号=' + num1 + '&采购员_check=' + check3 + '&采购员流水号=' + name1 + '&供应商_check=' + check4 + '&供应商名称=' + name2,
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
|
||||
@@ -168,3 +168,15 @@ export function searchContractDemo(num1 = null) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 设置安全库存
|
||||
export function setSafeValue(...params) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '2',
|
||||
name: '采购管理_离线合同_物料安全库存_修改数据',
|
||||
param: `物料流水号=${params[0]}&安全库存量=${params[1]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
|
||||
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
|
||||
@@ -143,6 +143,12 @@ export default {
|
||||
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 => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
console.log(response.data.rows[i].项目计划完成时间)
|
||||
if (response.data.rows[i].项目计划完成时间 !== '') {
|
||||
response.data.rows[i].项目计划完成时间 = (response.data.rows[i].项目计划完成时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-cjn-09" @click="saveApprove">保存</el-button>
|
||||
<el-checkbox v-model="checked" :disabled="isShow2" size="small" style="margin:10px">是否核准</el-checkbox>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll" :key="index" style="margin-bottom: 30px">
|
||||
<div v-for="(item, key) in dataAll" :key="key" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
@@ -206,7 +206,7 @@
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="典型工艺机床分类">
|
||||
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px" @change="SearchMachine">
|
||||
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px">
|
||||
<el-option
|
||||
v-for="item in machineType"
|
||||
:key="item.value"
|
||||
@@ -231,7 +231,7 @@
|
||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll1" :key="index" style="margin-bottom: 30px">
|
||||
<div v-for="(item, key) in dataAll1" :key="key" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
@@ -310,7 +310,7 @@
|
||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll1" :key="index" style="margin-bottom: 30px">
|
||||
<div v-for="(item, key) in dataAll1" :key="key" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
@@ -433,7 +433,8 @@ export default {
|
||||
machineType: [],
|
||||
AssemblyTask: '',
|
||||
Group: '',
|
||||
GroupNumberValue: [],
|
||||
GroupNumberValue: '',
|
||||
GroupNumberValue1: '',
|
||||
GroupNumber: [],
|
||||
GroupNum: '',
|
||||
GroupProcessNumber: '',
|
||||
@@ -448,7 +449,6 @@ export default {
|
||||
Procedure: '',
|
||||
ProcedureNameGroup: [],
|
||||
processRequestValue: '',
|
||||
ProcessContentGroup: [],
|
||||
QualityTesting: [],
|
||||
ProcessSequence: [],
|
||||
tableData: [],
|
||||
@@ -527,12 +527,11 @@ export default {
|
||||
},
|
||||
searchGroup() {
|
||||
this.GroupNumber = []
|
||||
this.GroupNumberValue = []
|
||||
searchGroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组号
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -670,37 +669,55 @@ export default {
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
// this.title = '增加组件工艺'
|
||||
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = ''])
|
||||
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = '', this.GroupNumberValue1 = ''])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
handleEdit(row, formName) {
|
||||
console.log(this.$refs[formName])
|
||||
if (this.$refs[formName] !== undefined) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
// this.editForm(row, 'form2', [this.title = '编辑组件工艺', this.GroupProcessNumber = row.组件工艺流水号, this.dialogFormVisible4 = true, this.Group = '', this.form2.组件 = []])
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
this.GroupNumberValue1 = ''
|
||||
this.title = '编辑组件工艺'
|
||||
this.dialogFormVisible4 = true
|
||||
this.form2.序号 = row.序号
|
||||
this.form2.装配任务 = row.装配任务
|
||||
this.Group = ''
|
||||
this.form2.组件 = []
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
console.log(row, 1111)
|
||||
this.form2.组件 = (row.组件流水号.split(',')).map(Number)
|
||||
console.log(this.form2.组件)
|
||||
},
|
||||
submitAdd() {
|
||||
for (var i = 0; i < this.form2.组件.length; i++) {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.addTable(submitAdd, [this.machineNumberValue, this.form2.序号, this.Group, this.form2.装配任务], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
this.addTable(submitAdd, [this.machineNumberValue, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
},
|
||||
submitEdit() {
|
||||
for (var i = 0; i < this.form2.组件.length; i++) {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务], 'form2', function() { this.searchDetail(); this.dialogFormVisible4 = false })
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.searchDetail(); this.dialogFormVisible4 = false })
|
||||
},
|
||||
deleteGroup(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
|
||||
@@ -99,8 +99,8 @@
|
||||
<td colspan="6">{{ list.工艺内容及装配具体要求 }}</td>
|
||||
<td align="center">{{ list.质检 }}</td>
|
||||
<td>{{ list.工时 }}</td>
|
||||
<td>{{ list.完成情况 }}</td>
|
||||
<td>{{ list.检验情况 }}</td>
|
||||
<td>{{ list.装配员 }}</td>
|
||||
<td>{{ list.检验员 }}</td>
|
||||
<td width="100px">{{ list.备注 }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
477
src/views/Assembly/TypicalAssemblyMaintenance/index.vue
Normal file
477
src/views/Assembly/TypicalAssemblyMaintenance/index.vue
Normal file
@@ -0,0 +1,477 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<span>机床分类:</span>
|
||||
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px" @change="SearchMachine">
|
||||
<el-option
|
||||
v-for="item in machineType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue1" placeholder="机床编号" size="small" style="width:150px" @change="searchGroup()">
|
||||
<el-option
|
||||
v-for="item in machineNumber2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" style="margin-left: 10px;" size="small" @click="searchDetail">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-tickets" @click="handleAdd">增加</el-button>
|
||||
<el-button type="danger" size="small" icon="el-icon-delete" @click="deleteTable">删除</el-button>
|
||||
</el-card>
|
||||
<el-card style="background-color: #DCDCDC">
|
||||
<div v-for="(item, key) in dataAll" :key="key" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ 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="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.row, 'form2')">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="deleteGroup(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.序号" size="mini" style="width:60px" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.工序名称"
|
||||
size="mini"
|
||||
style="width:200px"
|
||||
@dblclick.native="tableSearch(scope.row)"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺内容及装配具体要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.工艺内容及装配具体要求"
|
||||
:rows="1"
|
||||
size="mini"
|
||||
type="textarea"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.质检" size="mini" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺工时" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺工时" size="mini" align="center" @change="update2(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-arrow-up"
|
||||
type="primary"
|
||||
@click="upOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-arrow-down"
|
||||
type="primary"
|
||||
@click="downOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
type="primary"
|
||||
@click="insertOne(scope.row)"/>
|
||||
<el-button
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="deleteOne(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="工序名称、工序要求选择" center width="400px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="工序名称分类">
|
||||
<el-select v-model="processNameClassValue" placeholder="分类" size="small" @change="cChange()">
|
||||
<el-option
|
||||
v-for="item in processNameClass"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序名称">
|
||||
<el-select v-model="processNameValue" placeholder="名称" size="small" @change="nChange()">
|
||||
<el-option
|
||||
v-for="item in processName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序要求">
|
||||
<el-input v-model="processRequestValue" placeholder="要求" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button size="mini" type="primary" @click="confirmSelect()">确定选择</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="序号" prop="序号">
|
||||
<el-input v-model="form2.序号" placeholder="序号" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="组件" prop="组件">
|
||||
<el-select v-model="form2.组件" multiple placeholder="组件" size="small">
|
||||
<el-option
|
||||
v-for="item in GroupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="装配任务" prop="装配任务">
|
||||
<el-input v-model="form2.装配任务" placeholder="装配任务" type="textarea" size="small"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible4=false">取消</el-button>
|
||||
<el-button v-show="title==='增加组件工艺'" type="primary" @click="submitAdd()">确定</el-button>
|
||||
<el-button v-show="title==='编辑组件工艺'" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SearchMachine, searchDetail, searchProcess, update, submitAdd, submitEdit, insertOne, update2, upOne, downOne, deleteOne,
|
||||
deleteGroup, initmachineType, initprocessNameClass, initProcessName, update1, searchGroup } from '@/api/Assembly/TypicalAssemblyMaintenance'
|
||||
import '@/icon/iconfont.css'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
radio: 0,
|
||||
checked: false,
|
||||
number: '',
|
||||
machineNumberValue1: '',
|
||||
machineNumber2: [],
|
||||
machineTypeValue: '',
|
||||
machineType: [],
|
||||
AssemblyTask: '',
|
||||
Group: '',
|
||||
GroupNumberValue: [],
|
||||
GroupNumberValue1: '',
|
||||
GroupNumber: [],
|
||||
GroupNum: '',
|
||||
GroupProcessNumber: '',
|
||||
SerialNumber: '',
|
||||
SerialNumberGroup: [],
|
||||
isShow2: false,
|
||||
processNameClassValue: '',
|
||||
processNameClass: [],
|
||||
processNameValue: '',
|
||||
Process: '',
|
||||
processName: [],
|
||||
Procedure: '',
|
||||
ProcedureNameGroup: [],
|
||||
processRequestValue: '',
|
||||
ProcessContentGroup: [],
|
||||
QualityTesting: [],
|
||||
ProcessSequence: [],
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
loading: false,
|
||||
form1: {},
|
||||
form2: {
|
||||
序号: '',
|
||||
组件: [],
|
||||
装配任务: ''
|
||||
},
|
||||
rules: {
|
||||
序号: [{ required: true, message: '请输入序号', trigger: 'blur' }],
|
||||
组件: [{ required: true, message: '请选择组件', trigger: 'change' }],
|
||||
装配任务: [{ required: true, message: '请输入装配任务', trigger: 'blur' }]
|
||||
},
|
||||
num1: '',
|
||||
result: 0,
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible4: false,
|
||||
dataAll: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initprocessNameClass().then(response => { // 初始化工序分类
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.processNameClass.push({
|
||||
label: response.data[i].工序分类名称,
|
||||
value: response.data[i].工序分类流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initmachineType().then(response => { // 初始化机床分类
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineType.push({
|
||||
label: response.data[i].机床分类名称,
|
||||
value: response.data[i].机床分类流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
SearchMachine() {
|
||||
this.machineNumberValue1 = ''
|
||||
this.machineNumber2 = []
|
||||
SearchMachine(this.machineTypeValue).then(response => { // 典型机床查询
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber2.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroup() {
|
||||
this.GroupNumber = []
|
||||
this.GroupNumberValue = []
|
||||
searchGroup(this.machineNumberValue1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async searchDetail() { // 主表查询
|
||||
this.dataAll = []
|
||||
if (this.machineNumberValue1 !== '') {
|
||||
const response = await searchDetail(this.machineNumberValue1)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll.push({
|
||||
table1: [data[i]],
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
update(row) {
|
||||
update(row.装配工序流水号, row.序号, row.工序名称, row.工艺内容及装配具体要求, row.质检).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
update2(row) {
|
||||
update2(row.装配工序流水号, row.工艺工时).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.machineNumberValue1 !== '') {
|
||||
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = '', this.GroupNumberValue1 = ''])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
handleEdit(row, formName) {
|
||||
if (this.$refs[formName] !== undefined) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
this.GroupNumberValue1 = ''
|
||||
this.title = '编辑组件工艺'
|
||||
this.dialogFormVisible4 = true
|
||||
this.form2.序号 = row.序号
|
||||
this.form2.装配任务 = row.装配任务
|
||||
this.Group = ''
|
||||
console.log(row, 1111)
|
||||
this.form2.组件 = (row.组件流水号.split(',')).map(Number)
|
||||
console.log(this.form2.组件)
|
||||
},
|
||||
submitAdd() {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.addTable(submitAdd, [this.machineNumberValue1, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
},
|
||||
submitEdit() {
|
||||
this.GroupNumberValue1 = this.form2.组件[0]
|
||||
for (let h = 1; h < this.form2.组件.length; h++) {
|
||||
this.GroupNumberValue1 += ',' + this.form2.组件[h]
|
||||
}
|
||||
for (let i = 0; i < this.form2.组件.length; i++) {
|
||||
for (let j = 0; j < this.GroupNumber.length; j++) {
|
||||
if (this.form2.组件[i] === this.GroupNumber[j].value) {
|
||||
this.form2.组件[i] = this.GroupNumber[j].label
|
||||
}
|
||||
}
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务, this.GroupNumberValue1], 'form2', function() { this.searchDetail(); this.dialogFormVisible4 = false })
|
||||
},
|
||||
deleteGroup(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteGroup(row.组件工艺流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchDetail()
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
insertOne(row) {
|
||||
insertOne(row.组件工艺流水号).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
deleteTable() {
|
||||
this.$confirm('此操作将永久删除该工艺, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.result = 0
|
||||
for (var i = 0; i < this.dataAll.length; i++) {
|
||||
deleteGroup(this.dataAll[i].table1[0].组件工艺流水号).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.dataAll.length) {
|
||||
this.$message.success('删除成功')
|
||||
this.searchDetail()
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
upOne(row) {
|
||||
upOne(row.装配工序流水号, row.组件工艺流水号, row.工序顺序).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
downOne(row) {
|
||||
downOne(row.装配工序流水号, row.组件工艺流水号, row.工序顺序).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
deleteOne(row) {
|
||||
deleteOne(row.装配工序流水号).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
cChange() {
|
||||
this.processName = []
|
||||
initProcessName(this.processNameClassValue).then(response => { // 初始化工序分类
|
||||
this.tableData = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.processName.push({
|
||||
label: response.data[i].工序名称,
|
||||
value: response.data[i].工序名称流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
nChange() {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.processNameValue === this.tableData[i].工序名称流水号) {
|
||||
this.Process = this.tableData[i].工序名称
|
||||
this.processRequestValue = this.tableData[i].工艺内容及装配具体要求
|
||||
}
|
||||
}
|
||||
},
|
||||
tableSearch(row) {
|
||||
this.dialogFormVisible2 = true
|
||||
this.processNameClassValue = ''
|
||||
this.processNameValue = ''
|
||||
this.processRequestValue = ''
|
||||
this.Procedure = row.装配工序流水号
|
||||
this.number = row.序号
|
||||
},
|
||||
confirmSelect() {
|
||||
update1(this.Procedure, this.number, this.Process, this.processRequestValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.dialogFormVisible2 = false
|
||||
this.$message.success('选择成功')
|
||||
this.searchDetail()
|
||||
} else {
|
||||
this.$message.success('选择失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -23,8 +23,8 @@
|
||||
{{ scope.row.领料单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领料时间" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-table-column label="领料时间" align="center" min-width="200" >
|
||||
<template slot-scope="scope" value-format="yyyy-MM-dd">
|
||||
{{ scope.row.领料时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -336,37 +336,37 @@
|
||||
</el-card>
|
||||
<!--基本件领料对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="基本件通用件领料" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" class="demo-ruleForm">
|
||||
<el-form-item label="出库数量" prop="OutNumber" label-width="100px" size="small">
|
||||
<el-input v-model="form.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-form-item label="出库备注" prop="outNote" label-width="100px">
|
||||
<el-input v-model="form.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="addBasicListDetail()">确 定</el-button>
|
||||
<el-button type="primary" @click="addBasicListDetail(form)">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--外购件领料对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="外购件标准件领料" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-form ref="form" :model="form" :rules="rules2" label-position="left" class="demo-ruleForm">
|
||||
<el-form-item label="出库数量" prop="OutNumber" label-width="100px" size="small">
|
||||
<el-input v-model="form.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库备注" prop="TotalContractAmount" label-width="100px">
|
||||
<el-form-item label="出库备注" prop="outNote" label-width="100px">
|
||||
<el-input v-model="form.outNote" size="small" placeholder="请输入备注" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="execaddListDetail()">确 定</el-button>
|
||||
<el-button type="primary" @click="execaddListDetail(form)">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--车间采购件领料对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisibleWork" title="车间采购件领料" center width="380px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" class="demo-ruleForm">
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
@@ -381,7 +381,7 @@
|
||||
</el-dialog>
|
||||
<!--编辑领料明细对话框-->
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="领料单明细" center width="380px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left">
|
||||
<el-form ref="form2" :model="form2" :rules="rules3" label-position="left" class="demo-ruleForm">
|
||||
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
|
||||
<el-input v-model="form2.OutNumber" size="small" placeholder="出库数量" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
@@ -508,7 +508,8 @@ export default {
|
||||
tableDataHouse: [],
|
||||
listLoadingx: '',
|
||||
purchaseDetailNum: '',
|
||||
dialogFormVisibleWork: false
|
||||
dialogFormVisibleWork: false,
|
||||
time: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -617,9 +618,13 @@ export default {
|
||||
searchListinfor() {
|
||||
this.listLoading2 = true
|
||||
searchList(this.PageCurrent2, this.PageSize2, this.pickingListNumber).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].领料时间 = response.data.rows[i].领料时间.substring(0, response.data.rows[i].领料时间.length - 8)
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.listLoading2 = false
|
||||
this.total2 = response.data.total
|
||||
console.log(response)
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
@@ -723,21 +728,25 @@ export default {
|
||||
this.materialNumber = row.零件图号
|
||||
console.log(this.receive, 41645)
|
||||
},
|
||||
addBasicListDetail() {
|
||||
addBasicListDetail(formName) {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} if (this.form.OutNumber === '') {
|
||||
this.$message.error('请输入领用数量')
|
||||
}
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible1 = false
|
||||
this.searchListinfor()
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible1 = false
|
||||
this.searchListinfor()
|
||||
},
|
||||
// 增加外购件领料单明细
|
||||
addListDetailinfor(row) {
|
||||
@@ -759,22 +768,26 @@ export default {
|
||||
this.dialogFormVisible = true
|
||||
this.purchaseDetailNum = row.采购合同明细流水号
|
||||
},
|
||||
execaddListDetail() {
|
||||
execaddListDetail(formName) {
|
||||
if (this.pickingListNumberx === '') {
|
||||
this.$message.error('请选择领料单')
|
||||
} else if (this.OutNumber === '') {
|
||||
this.$message.error('请输入领用数量')
|
||||
} else {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addListDetail(this.pickingListNumberx, this.partProjectNumber, this.partMachineNumber, this.partGroupNumber, this.partProjectName, this.partMachineName, this.partGroupName, this.materialName, this.materialType, this.materialNumber, this.form.OutNumber, this.partType, this.form.outNote, this.craftplannumber, this.receive, this.teamPart, this.locatenumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
this.searchListinfor()
|
||||
}
|
||||
this.dialogFormVisible = false
|
||||
this.searchListinfor()
|
||||
},
|
||||
// 增加车间采购领料单明细
|
||||
addWorkshopDetailinfor(row) {
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
<span>项目名称:</span>
|
||||
<el-select
|
||||
v-model="entryNameValue"
|
||||
:remote-method="remoteMethod"
|
||||
placeholder="项目名称"
|
||||
style="width:200px"
|
||||
size="small"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
@change="empty">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
@@ -19,9 +17,9 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床号:</span>
|
||||
<el-input v-model="machineToolNumber" placeholder="机床号" size="small" clearable style="width:200px" @change="empty1" @dblclick.native="SearchMachine"/>
|
||||
<el-input v-model="machineToolNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @change="empty1" @dblclick.native="SearchMachine"/>
|
||||
<span>组号:</span>
|
||||
<el-input v-model="groupNumber" placeholder="组号" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
||||
<el-input v-model="groupNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
||||
<span>年:</span>
|
||||
<el-date-picker
|
||||
v-model="year"
|
||||
@@ -155,7 +153,9 @@
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitName">提交</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitName">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible3" title="选择组号" center style="min-height: 300px">
|
||||
@@ -202,7 +202,9 @@
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitGroup">提交</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitGroup">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -238,7 +240,6 @@ export default {
|
||||
title: '',
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible3: false,
|
||||
List: [],
|
||||
check: null,
|
||||
check1: null,
|
||||
check2: null,
|
||||
@@ -289,8 +290,6 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
@@ -346,30 +345,15 @@ export default {
|
||||
}
|
||||
},
|
||||
getList() { // 初始化项目名称
|
||||
this.list = []
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.list.push({
|
||||
this.entryName.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
setTimeout(() => {
|
||||
this.entryName = this.list.filter(item => {
|
||||
if (item.label !== null) {
|
||||
return item.label.toLowerCase()
|
||||
.indexOf(query.toLowerCase()) > -1
|
||||
}
|
||||
})
|
||||
}, 1000)
|
||||
} else {
|
||||
this.entryName = []
|
||||
}
|
||||
},
|
||||
empty() {
|
||||
this.machineToolNumber = ''
|
||||
this.groupNumber = ''
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
style="width:200px"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="请购人" prop="请购人">
|
||||
<el-form-item label="请购人">
|
||||
<el-input
|
||||
v-model="name"
|
||||
size="small"
|
||||
@@ -496,6 +496,12 @@ export default {
|
||||
this.check4 = 0
|
||||
}
|
||||
searchTable1(this.PurchaseOrder, this.check4).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
console.log(response.data[i].请购时间)
|
||||
if (response.data[i].请购时间 !== '') {
|
||||
response.data[i].请购时间 = (response.data[i].请购时间).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
},
|
||||
|
||||
@@ -5,13 +5,11 @@
|
||||
<span>项目名称:</span>
|
||||
<el-select
|
||||
v-model="entryNameValue"
|
||||
:remote-method="remoteMethod"
|
||||
placeholder="项目名称"
|
||||
style="width:200px"
|
||||
size="small"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
@change="empty">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
@@ -20,6 +18,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床号:</span>
|
||||
<<<<<<< HEAD
|
||||
<el-input v-model="machineToolNumber" placeholder="机床号" size="small" readonly clearable style="width:200px" @change="empty1">
|
||||
<el-button slot="append" icon="el-icon-search" @click="SearchMachine" />
|
||||
</el-input>
|
||||
@@ -27,6 +26,11 @@
|
||||
<el-input v-model="groupNumber" placeholder="组号" size="small" readonly clearable style="width:200px">
|
||||
<el-button slot="append" icon="el-icon-search" @click="searchGroupList" />
|
||||
</el-input>
|
||||
=======
|
||||
<el-input v-model="machineToolNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="SearchMachine" @change="empty1"/>
|
||||
<span>组号:</span>
|
||||
<el-input v-model="groupNumber" placeholder="请双击选择" size="small" clearable style="width:200px" @dblclick.native="searchGroupList"/>
|
||||
>>>>>>> 45d3903a226c57546658abf8697edd180bd01975
|
||||
<span>零件号:</span>
|
||||
<el-input v-model="partNumber" placeholder="零件号" size="small" clearable style="width:200px"/>
|
||||
<br>
|
||||
@@ -191,7 +195,9 @@
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitName">提交</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitName">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible3" title="选择组号" center style="min-height: 300px">
|
||||
@@ -238,7 +244,9 @@
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
<el-button type="primary" style="margin-left: 350px;margin-top: 20px" @click="submitGroup">提交</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitGroup">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
@@ -311,8 +319,6 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
@@ -372,28 +378,15 @@ export default {
|
||||
})
|
||||
},
|
||||
getList() { // 初始化项目名称
|
||||
this.list = []
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.list.push({
|
||||
this.entryName.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
setTimeout(() => {
|
||||
this.entryName = this.list.filter(item => {
|
||||
return item.label.toLowerCase()
|
||||
.indexOf(query.toLowerCase()) > -1
|
||||
})
|
||||
}, 1000)
|
||||
} else {
|
||||
this.entryName = []
|
||||
}
|
||||
},
|
||||
empty() {
|
||||
this.machineToolNumber = ''
|
||||
this.groupNumber = ''
|
||||
|
||||
@@ -253,6 +253,7 @@ export default {
|
||||
this.form.设备型号 = row.设备型号
|
||||
this.form.设备性能指标 = row.设备性能指标
|
||||
this.form.设备加工能力 = row.设备加工能力工时
|
||||
this.form.设备加工工艺 = parseInt(row.工艺属性代码)
|
||||
this.form.班次类型 = row.班次类型
|
||||
this.form.设备工时系数 = row.设备工时系数
|
||||
this.form.整改工时系数 = row.整改工时比例
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<span>提前</span>
|
||||
<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>
|
||||
<span>天预警</span>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -70,7 +73,7 @@
|
||||
<el-progress
|
||||
:text-inside="true"
|
||||
:stroke-width="18"
|
||||
:percentage="100*(parseInt(scope.row.合同物料到货总数)/parseInt(scope.row.合同物料采购总数)).toFixed(4)"
|
||||
:percentage="parseFloat((100*scope.row.合同物料到货总数/scope.row.合同物料采购总数).toFixed(2))"
|
||||
status="success"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -114,7 +117,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="已到货数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总到货数量 }}
|
||||
{{ scope.row.总到货数量 ? scope.row.总到货数量 : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -130,6 +133,7 @@ export default {
|
||||
name: '', // 项目总价查询
|
||||
data() {
|
||||
return {
|
||||
warningValue: 3,
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
contractNumValue: '',
|
||||
@@ -169,6 +173,7 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.warningValue ? this.warningValue : this.warningValue = 1
|
||||
this.arrival = [] // 规定到货时间数组
|
||||
this.now = new Date()
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
@@ -177,13 +182,13 @@ export default {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.arrival.push(new Date(response.data.rows[i].规定到货时间))
|
||||
if (parseInt(response.data.rows[i].合同物料到货总数) === parseInt(response.data.rows[i].合同物料采购总数)) {
|
||||
this.judge[i] = 1
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) > 0 && (this.now - this.arrival[i]) < 86400000) {
|
||||
this.judge[i] = 2
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) > 86400000) {
|
||||
this.judge[i] = 3
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) < 0) {
|
||||
this.judge[i] = 4
|
||||
this.judge[i] = 1 // 全部到货
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) > 0 && (this.arrival[i] - this.now) < (86400000 * this.warningValue)) {
|
||||
this.judge[i] = 2 // 即将拖期
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) < 0) {
|
||||
this.judge[i] = 3 // 已拖期
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) > (86400000 * this.warningValue)) {
|
||||
this.judge[i] = 4 // 进度正常
|
||||
}
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
|
||||
@@ -20,24 +20,20 @@
|
||||
<span>合同号:</span>
|
||||
<el-input v-model="contractNum" placeholder="合同号" size="small" style="width:180px" clearable/>
|
||||
<span>采购员:</span>
|
||||
<el-input
|
||||
v-model="buyerName"
|
||||
placeholder="采购员"
|
||||
size="small"
|
||||
readonly
|
||||
clearable
|
||||
style="width:100px"
|
||||
@dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px" clearable>
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input
|
||||
v-model="supplierName"
|
||||
placeholder="供应商"
|
||||
size="small"
|
||||
readonly
|
||||
clearable
|
||||
style="width:180px"
|
||||
@dblclick.native="dialogVisible1=true;submitDisable=true"
|
||||
@clear="emptySupplierDetail"/>
|
||||
style="width:180px"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
@@ -48,19 +44,19 @@
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading1" :data="tableData1" size="mini" border style="width: 100%;">
|
||||
<el-table-column label="采购合同编号" min-width="150" align="center">
|
||||
<el-table-column label="采购合同编号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同名称" min-width="150" align="center">
|
||||
<el-table-column label="采购合同名称" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间 }}
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="200" align="center">
|
||||
@@ -78,7 +74,7 @@
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" min-width="100" align="center">
|
||||
<el-table-column label="欠款金额" min-width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.欠款金额 }}
|
||||
</template>
|
||||
@@ -93,7 +89,7 @@
|
||||
<el-input v-model="scope.row.本次应请款" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" width="810" align="center">
|
||||
<el-table-column label="请款付款情况" width="900" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-table v-show="tableData11[scope.$index].length!==0" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<el-table-column label="次数" min-width="60" align="center" type="index"/>
|
||||
@@ -104,25 +100,25 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间 }}
|
||||
{{ scope.row.请款时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核情况内容" width="80" align="center">
|
||||
<el-table-column label="审核情况" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审核情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审核原因" width="80" align="center">
|
||||
<el-table-column label="未通过审核原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审核原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批情况内容" width="80" align="center">
|
||||
<el-table-column label="审批情况" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="80" align="center">
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
@@ -132,7 +128,7 @@
|
||||
{{ scope.row.付款情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="80" align="center">
|
||||
<el-table-column label="未付款原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 }}
|
||||
</template>
|
||||
@@ -142,7 +138,6 @@
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -217,15 +212,10 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间 }}
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际到货时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<el-table-column label="供应商" min-width="250" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
@@ -257,170 +247,23 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间 }}
|
||||
{{ scope.row.请款时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商名称">
|
||||
<el-input v-model="supplierName" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="企业性质">
|
||||
<el-input v-model="enterpriseNature" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="货期">
|
||||
<el-input v-model="goodTime" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="注册资本">
|
||||
<el-input v-model="registeredCapital" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="税号">
|
||||
<el-input v-model="taxNum" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电子邮箱">
|
||||
<el-input v-model="EMail" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址">
|
||||
<el-input v-model="address" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="账号">
|
||||
<el-input v-model="account" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开户行">
|
||||
<el-input v-model="openingBank" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电话号码">
|
||||
<el-input v-model="phone" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="传真">
|
||||
<el-input v-model="fax" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
@click="searchSupplier">查询</el-button>
|
||||
<el-button
|
||||
:disabled="submitDisable"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitSelectSupplier">确定</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
icon="el-icon-delete"
|
||||
@click="emptySupplierDetail">清空</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="tableData01" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="200px" border @row-click="showSupplierDetail">
|
||||
<el-table-column align="center" label="供应商名称" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="企业性质">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.企业性质 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="创立日期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.创立日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="注册资本">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.注册资本 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="采购员选择" center style="min-height: 300px;" width="40%">
|
||||
<el-table
|
||||
:data="tableData02"
|
||||
size="small"
|
||||
border
|
||||
style="width: 100%;min-height:300px"
|
||||
height="300px"
|
||||
highlight-current-row
|
||||
@row-click="clickBuyer">
|
||||
<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.姓名 }}
|
||||
</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.岗位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :disabled="submitDisable" type="primary" size="small" icon="el-icon-check" @click="submitSelectBuyer">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSupplier, searchTable1, requestFund, searchCondition, cancelRequestFund, searchRequestTable, initBuyer } from '@/api/PurchasingCenter/BuyerRequestFund'
|
||||
import { searchTable1, requestFund, searchCondition, cancelRequestFund, searchRequestTable, initBuyer } from '@/api/PurchasingCenter/BuyerRequestFund'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData02: [],
|
||||
dialogVisible2: false,
|
||||
personValue: '',
|
||||
person: [],
|
||||
loading2: false,
|
||||
tableData2: [],
|
||||
tableData11: [],
|
||||
@@ -430,35 +273,9 @@ export default {
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
contractNum: '',
|
||||
buyerName: '',
|
||||
dialogVisible1: false,
|
||||
submitDisable: true,
|
||||
form1: {},
|
||||
supplierValue: '',
|
||||
supplierName: '',
|
||||
enterpriseNature: '',
|
||||
createDate: '',
|
||||
registeredCapital: '',
|
||||
taxNum: '',
|
||||
EMail: '',
|
||||
address: '',
|
||||
account: '',
|
||||
openingBank: '',
|
||||
phone: '',
|
||||
fax: '',
|
||||
goodTime: '',
|
||||
supplierCheck1: 0,
|
||||
supplierCheck2: 0,
|
||||
supplierCheck3: 0,
|
||||
supplierCheck4: 0,
|
||||
supplierCheck5: 0,
|
||||
supplierCheck6: 0,
|
||||
supplierCheck7: 0,
|
||||
supplierCheck8: 0,
|
||||
supplierCheck9: 0,
|
||||
supplierCheck10: 0,
|
||||
supplierCheck11: 0,
|
||||
supplierCheck12: 0,
|
||||
tableData01: [],
|
||||
loading1: false,
|
||||
tableData1: [],
|
||||
@@ -479,98 +296,39 @@ export default {
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.initBuyer()
|
||||
},
|
||||
methods: {
|
||||
submitSelectBuyer() { // 确定
|
||||
this.dialogVisible2 = false
|
||||
},
|
||||
clickBuyer(row) { // 点击采购员表某一行
|
||||
this.submitDisable = false
|
||||
this.buyerName = row.姓名
|
||||
},
|
||||
initBuyer() { // 初始化采购人员
|
||||
initBuyer().then(response => {
|
||||
this.tableData02 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.person.push({
|
||||
text: response.data[i].姓名,
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
|
||||
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
|
||||
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
|
||||
this.createDate ? this.supplierCheck3 = 1 : (this.supplierCheck3 = 0, this.createDate = '')
|
||||
this.registeredCapital ? this.supplierCheck4 = 1 : (this.supplierCheck4 = 0, this.registeredCapital = '')
|
||||
this.taxNum ? this.supplierCheck5 = 1 : (this.supplierCheck5 = 0, this.taxNum = '')
|
||||
this.EMail ? this.supplierCheck6 = 1 : (this.supplierCheck6 = 0, this.EMail = '')
|
||||
this.address ? this.supplierCheck7 = 1 : (this.supplierCheck7 = 0, this.address = '')
|
||||
this.account ? this.supplierCheck8 = 1 : (this.supplierCheck8 = 0, this.account = '')
|
||||
this.openingBank ? this.supplierCheck9 = 1 : (this.supplierCheck9 = 0, this.openingBank = '')
|
||||
this.phone ? this.supplierCheck10 = 1 : (this.supplierCheck10 = 0, this.phone = '')
|
||||
this.fax ? this.supplierCheck11 = 1 : (this.supplierCheck11 = 0, this.fax = '')
|
||||
this.goodTime ? this.supplierCheck12 = 1 : (this.supplierCheck12 = 0, this.goodTime = '')
|
||||
searchSupplier(this.supplierCheck1, this.supplierName, this.supplierCheck2, this.enterpriseNature, this.supplierCheck3, this.createDate, this.supplierCheck4, this.registeredCapital, this.supplierCheck5, this.taxNum, this.supplierCheck6, this.EMail, this.supplierCheck7, this.address, this.supplierCheck8, this.account, this.supplierCheck9, this.openingBank, this.supplierCheck10, this.phone, this.supplierCheck11, this.fax, this.supplierCheck12, this.goodTime).then(response => {
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
},
|
||||
submitSelectSupplier() { // 确定选择供应商
|
||||
this.dialogVisible1 = false
|
||||
},
|
||||
emptySupplierDetail() { // 清空
|
||||
this.submitDisable = true
|
||||
this.supplierValue = ''
|
||||
this.supplierName = ''
|
||||
this.enterpriseNature = ''
|
||||
this.createDate = ''
|
||||
this.registeredCapital = ''
|
||||
this.taxNum = ''
|
||||
this.EMail = ''
|
||||
this.address = ''
|
||||
this.account = ''
|
||||
this.openingBank = ''
|
||||
this.phone = ''
|
||||
this.fax = ''
|
||||
this.goodTime = ''
|
||||
},
|
||||
showSupplierDetail(row) { // 点击供应商表某一行
|
||||
this.submitDisable = false
|
||||
this.supplierValue = row.供应商流水号
|
||||
this.supplierName = row.供应商名称
|
||||
this.enterpriseNature = row.企业性质
|
||||
this.createDate = row.创立日期
|
||||
this.registeredCapital = row.注册资本
|
||||
this.taxNum = row.税号
|
||||
this.EMail = row.电子信箱
|
||||
this.address = row.地址
|
||||
this.account = row.帐号
|
||||
this.openingBank = row.开户行
|
||||
this.phone = row.电话号码
|
||||
this.fax = row.传真
|
||||
this.goodTime = row.货期
|
||||
},
|
||||
searchTable1() {
|
||||
this.loading1 = true
|
||||
this.tableData1 = []
|
||||
this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0
|
||||
this.contractNum ? this.check2 = 1 : this.check2 = 0
|
||||
this.buyerName ? this.check3 = 1 : this.check3 = 0
|
||||
this.personValue ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName ? this.check4 = 1 : this.check4 = 0
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startDate, this.endDate, this.check2, this.contractNum, this.check3, this.buyerName, this.check4, this.supplierName).then(response => {
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startDate, this.endDate, this.check2, this.contractNum, this.check3, this.personValue, this.check4, this.supplierName).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].规定到货时间 !== null) {
|
||||
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
if (response.data.rows[j].实际到货时间 !== null) {
|
||||
response.data.rows[j].实际到货时间 = response.data.rows[j].实际到货时间.substring(0, response.data.rows[j].实际到货时间.indexOf(' '))
|
||||
}
|
||||
this.tableData11[j] = []
|
||||
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
for (let i = 0; i < response0.data.length; i++) {
|
||||
if (response0.data[i].请款时间 !== null) {
|
||||
response0.data[i].请款时间 = response0.data[i].请款时间.substring(0, response0.data[i].请款时间.indexOf(' '))
|
||||
}
|
||||
this.tableData11[j].push(response0.data[i])
|
||||
}
|
||||
})
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading1 = false
|
||||
})
|
||||
@@ -630,12 +388,6 @@ export default {
|
||||
} else { this.checkRequest = 1 }
|
||||
searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
if (response.data[j].规定到货时间 !== null) {
|
||||
response.data[j].规定到货时间 = response.data[j].规定到货时间.substring(0, response.data[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
if (response.data[j].实际到货时间 !== null) {
|
||||
response.data[j].实际到货时间 = response.data[j].实际到货时间.substring(0, response.data[j].实际到货时间.indexOf(' '))
|
||||
}
|
||||
if (response.data[j].请款时间 !== null) {
|
||||
response.data[j].请款时间 = response.data[j].请款时间.substring(0, response.data[j].请款时间.indexOf(' '))
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" clearable style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
@@ -186,7 +186,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue3" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-select v-model="personValue3" placeholder="采购员" size="small" clearable style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
@@ -494,16 +494,27 @@ export default {
|
||||
},
|
||||
contractChange() {
|
||||
if (this.contractValue) {
|
||||
contractChange(this.contractValue, this.changeReason).then(response => {
|
||||
this.contractValue = ''
|
||||
this.changeReason = ''
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('变更成功')
|
||||
this.searchTable1()
|
||||
this.contractNumValue = ''
|
||||
this.contractNumValue3 = ''
|
||||
this.fetchData()
|
||||
} else { this.$message.error('变更失败') }
|
||||
this.$confirm('确定更改该合同?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
contractChange(this.contractValue, this.changeReason).then(response => {
|
||||
this.contractValue = ''
|
||||
this.changeReason = ''
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('变更成功')
|
||||
this.searchTable1()
|
||||
this.contractNumValue = ''
|
||||
this.contractNumValue3 = ''
|
||||
this.fetchData()
|
||||
} else { this.$message.error('变更失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请先选择合同')
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
style="margin-top:10px"
|
||||
@click="calculateContractSum">计算合同总额</el-button>
|
||||
<span>合同总额:</span>
|
||||
<el-input v-model="contractSum" size="small"/>
|
||||
<el-input v-model="contractSum" size="small" readonly/>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
@@ -237,10 +237,10 @@ export default {
|
||||
searchView: '',
|
||||
fileList: [],
|
||||
minDate: null,
|
||||
endDateOpt: { // 为了让规定到货时间早于物料计划到货时间
|
||||
endDateOpt: { // 禁用大于规定到货日期和小于当前日期
|
||||
disabledDate: (time) => {
|
||||
if (this.minDate) {
|
||||
return time.getTime() > this.minDate
|
||||
return time.getTime() > this.minDate || time.getTime() < new Date()
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -262,8 +262,8 @@ export default {
|
||||
payTime5Value: '', // 付款时间
|
||||
payTime6Value: '', // 付款时间
|
||||
freight: '', // 运费
|
||||
taxRate: '', // 税率
|
||||
currencyValue: '', // 币种
|
||||
taxRate: '0.17', // 税率
|
||||
currencyValue: 1, // 币种
|
||||
currency: [
|
||||
{
|
||||
label: '人民币',
|
||||
|
||||
@@ -318,23 +318,20 @@
|
||||
<el-input v-model="form2.inquirySheetNum" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierName">
|
||||
<el-input v-model="form2.supplierName" size="small" readonly>
|
||||
<el-button slot="append" icon="el-icon-search" @click="dialogVisible1=true"/>
|
||||
</el-input>
|
||||
<el-input v-model="form2.supplierName" size="small" readonly @focus="dialogVisible1=true"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible2=false">取消</el-button>
|
||||
<el-button
|
||||
v-show="title2==='创建询价单'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitCreateInquirySheet">确定</el-button>
|
||||
<el-button
|
||||
v-show="title2==='编辑询价单'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitEditInquirySheet">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -342,7 +339,7 @@
|
||||
<el-dialog :visible.sync="dialogVisible3" title="物料变更选择" center style="min-height: 300px;" width="780px">
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName0" placeholder="物料名称" size="small" clearable/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" @click="pageCurrent02=1;pageSize02=10;total02=0;searchMaterial()">查询</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="pageCurrent02=1;pageSize02=10;total02=0;searchMaterial()">查询</el-button>
|
||||
<el-table :data="tableData02" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="400px" border highlight-current-row @row-click="selectNewMaterial">
|
||||
<el-table-column align="center" label="物料名称" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
@@ -374,7 +371,8 @@
|
||||
<span style="font-size: large;color: red">将原物料替换为: {{ materialNew }}</span>
|
||||
<!--<el-input v-model="materialNew" size="small" readonly style="margin: 10px 10px 0 10px"></el-input>-->
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="small" icon="el-icon-check" @click="submitMaterialChange">确定</el-button>
|
||||
<el-button size="small" @click="dialogVisible3=false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitMaterialChange">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading1"
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;max-height: 300px;"
|
||||
@@ -69,7 +70,22 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="安全库存量" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.安全库存量 }}
|
||||
<template v-if="scope.row.changeSafeValue">
|
||||
<el-input v-model="scope.row.安全库存量" class="edit-input" size="mini"/>
|
||||
<el-button class="cancel-btn" size="mini" icon="el-icon-refresh" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
|
||||
</template>
|
||||
<span v-else>{{ scope.row.安全库存量 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设置" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.changeSafeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
@click="scope.row.changeSafeValue=!scope.row.changeSafeValue">设置</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -228,12 +244,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="合计" align="center" min-width="100" prop="合计">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.单价) * parseInt(scope.row.数量) }}
|
||||
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
|
||||
<el-button :disabled="disable" type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -243,7 +259,7 @@
|
||||
<el-table
|
||||
:data="tableData4"
|
||||
:show-header="false"
|
||||
highlight-current-row
|
||||
:highlight-current-row="!disable"
|
||||
border
|
||||
height="280px"
|
||||
style="width: 250px;display:inline-block;max-height: 280px;"
|
||||
@@ -256,7 +272,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-input :rows="20" v-model="textArea" :readonly="disable" type="textarea" style="width:calc(99% - 250px);float:right;margin-bottom: 20px" resize="none"/>
|
||||
<el-button type="success" size="mini" icon="el-icon-circle-check-outline" @click="doneOfflineContact">生成离线合同</el-button>
|
||||
<el-button :disabled="disable" type="success" size="mini" icon="el-icon-circle-check-outline" @click="doneOfflineContact">生成离线合同</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
|
||||
@@ -491,13 +507,14 @@
|
||||
|
||||
<script>
|
||||
import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, initPayMethod, initPayTimeNode, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
|
||||
addMateriel, deleteMateriel, doneOfflineContact, searchContractDemo } from '@/api/PurchasingCenter/OfflineContract'
|
||||
addMateriel, deleteMateriel, doneOfflineContact, searchContractDemo, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 离线合同
|
||||
data() {
|
||||
return {
|
||||
loading1: false,
|
||||
title2: '',
|
||||
purchaseStateValue: 2, // 采购状态 全部
|
||||
purchaseState: [
|
||||
@@ -603,7 +620,7 @@ export default {
|
||||
disable2: true,
|
||||
disable3: true,
|
||||
disable4: true,
|
||||
disable: false // 其他的禁用
|
||||
disable: true // 其他的禁用
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -640,12 +657,18 @@ export default {
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询物料库物料
|
||||
this.loading1 = true
|
||||
this.materialName ? this.check1 = 1 : this.check1 = 0
|
||||
this.inventoryStateValue ? this.check2 = 1 : this.check2 = 0
|
||||
searchInventoryNum(this.pageCurrent1, this.pageSize1, this.check1, this.materialName, this.check2, this.inventoryStateValue, this.purchaseStateValue).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData1 = response.data.rows
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'changeSafeValue', false)
|
||||
v.原安全库存量 = v.安全库存量
|
||||
return v
|
||||
})
|
||||
this.total1 = response.data.total
|
||||
this.loading1 = false
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
@@ -663,6 +686,23 @@ export default {
|
||||
this.materielGroup.push(val[i].物料流水号)
|
||||
}
|
||||
},
|
||||
cancelEdit(row) { // 取消设置
|
||||
row.安全库存量 = row.原安全库存量
|
||||
row.changeSafeValue = false
|
||||
this.$message('取消修改')
|
||||
},
|
||||
confirmEdit(row) { // 确认设置
|
||||
Number(row.安全库存量) ? row.安全库存量 = Number(row.安全库存量) : row.安全库存量 = 0
|
||||
setSafeValue(row.物料流水号, parseInt(row.安全库存量)).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
row.changeSafeValue = false
|
||||
this.$message.success('设置成功')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('设置失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable2() { // 查询离线合同列表
|
||||
this.offlineContract ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
|
||||
@@ -963,9 +1003,11 @@ export default {
|
||||
}
|
||||
}
|
||||
this.paramRow = row
|
||||
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
|
||||
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
|
||||
})
|
||||
if (!this.disable) {
|
||||
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
|
||||
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
|
||||
})
|
||||
}
|
||||
},
|
||||
payMethodChange() { // 付款方式改变
|
||||
for (let i = 0; i < this.payMethod.length; i++) {
|
||||
@@ -1023,4 +1065,12 @@ export default {
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-left: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
<el-button :disabled="parseInt(scope.row.审核情况流水号)!==3&&parseInt(scope.row.审批情况流水号)!==3&&parseInt(scope.row.付款情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="预付款时间" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.预付时间 }}
|
||||
{{ scope.row.预付时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款比例" align="center" min-width="100">
|
||||
@@ -175,7 +175,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="付款时间" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.预付时间 }}
|
||||
{{ scope.row.预付时间 ? scope.row.预付时间.split(' ')[0] : '参考时间节点未设置' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款比例" align="center" min-width="100">
|
||||
|
||||
@@ -165,6 +165,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible3=false">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitApproval('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
@@ -239,11 +239,8 @@ export default {
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
mounted() {
|
||||
this.useqrcode()
|
||||
},
|
||||
methods: {
|
||||
useqrcode() {
|
||||
useqrcode(contractNum) {
|
||||
const opts = {
|
||||
errorCorrectionLevel: 'H',
|
||||
type: 'image/jpeg',
|
||||
@@ -251,7 +248,8 @@ export default {
|
||||
quality: 0.3
|
||||
}
|
||||
}
|
||||
QRCode.toDataURL('知道这是啥吗你就扫', opts, function(err, url) {
|
||||
const str = 'http://192.168.1.111:8022/searchContract.html?contractNum=' + contractNum
|
||||
QRCode.toDataURL(str, opts, function(err, url) {
|
||||
if (err) throw err
|
||||
const img = document.getElementById('img')
|
||||
img.src = url
|
||||
@@ -260,7 +258,6 @@ export default {
|
||||
searchPic() {
|
||||
// 读取图片时,查找合同流水号,获取其下所有图片id,根据拼接成的路径,查询图片显示出来。
|
||||
searchFile(this.contract).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data.length !== 0) {
|
||||
this.searchView = 'http://localhost:8022/Img/' + response.data[0].文件名
|
||||
} else {
|
||||
@@ -335,6 +332,7 @@ export default {
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.useqrcode(row.采购合同流水号)
|
||||
this.textarea = row.合同文本
|
||||
this.supplier = row.供应商名称
|
||||
this.contract = row.采购合同编号
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量">
|
||||
<el-table-column align="center" label="小计(元)" prop="小计">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
{{ scope.row.小计 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="单价">
|
||||
@@ -51,9 +51,14 @@
|
||||
{{ scope.row.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="小计(元)" prop="小计">
|
||||
<el-table-column align="center" label="领用数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.小计 }}
|
||||
{{ scope.row.出库数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="领用时间">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.出库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="supplierName" size="small" readonly clearable @dblclick.native="dialogVisible1=true;submitDisable=true" @clear="emptySupplierDetail"/>
|
||||
<el-input v-model="supplierName" size="small" placeholder="请双击选择" readonly clearable @dblclick.native="dialogVisible1=true;submitDisable=true" @clear="emptySupplierDetail"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
||||
@@ -22,11 +22,10 @@
|
||||
<span>采购员:</span>
|
||||
<el-input
|
||||
v-model="buyerName"
|
||||
placeholder="采购员"
|
||||
placeholder="请双击选择"
|
||||
size="small"
|
||||
readonly
|
||||
clearable
|
||||
style="width:100px"
|
||||
style="width:120px"
|
||||
@dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<el-input v-model="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
@@ -266,7 +266,9 @@ export default {
|
||||
审批是否通过: '',
|
||||
未通过原因: ''
|
||||
},
|
||||
rules2: {},
|
||||
rules2: {
|
||||
审批是否通过: [{ required: true, message: '请选择', trigger: 'change' }]
|
||||
},
|
||||
tableData2: [],
|
||||
textarea: ``,
|
||||
contractValue: '' // 显示表2和变更合同用的变量
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<el-input v-model="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<span>审批情况:</span>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
style="width:240px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
@@ -14,7 +14,7 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" style="width:180px" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
@@ -25,7 +25,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;Buyer=0"/>
|
||||
<el-input v-model="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;Buyer=0"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span>供应商:</span>
|
||||
@@ -144,7 +144,7 @@
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
style="width:240px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
@@ -152,7 +152,7 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" style="width:180px" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
@@ -163,7 +163,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName1" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=1"/>
|
||||
<el-input v-model="buyerName1" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=1"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span>供应商:</span>
|
||||
|
||||
Reference in New Issue
Block a user