Merge branch 'master' of ssh://192.168.0.149:29418/高精2.0

This commit is contained in:
caoxinyu
2019-06-19 14:28:55 +08:00
6 changed files with 135 additions and 22 deletions

View File

@@ -42,7 +42,7 @@ export function searchList(pageCurrent, pageSize, listNumber_check, listNumber)
data: {
type: '1',
name: '车间装配管理_领料单_查询数据',
param: '领料单编号_check=' + listNumber_check + '&领料单编号=' + listNumber,
param: '领料单编号_check=' + listNumber_check + '&领料单编号=' + listNumber + '&是否审批=1',
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -72,6 +72,17 @@ export function savePrice(price, num1, num2, num3, num4, num5) {
}
})
}
// 实时保存备注
export function saveRemark(price, num1, num2, num3, num4, num5) {
return request({
url: '',
method: 'post',
data: {
type: '4',
name: `update 采购管理_询价单明细_视图 set 备注 = '${price}' where isnull(物料流水号,0) = isnull('${num1}',0) and 询价单流水号 = ${num2} and isnull(零件名称,'') = '${num3}' and isnull(零件图号,'') = '${num4}' and (isnull(规格,'') = '${num5}' or isnull(物料规格,'') = '${num5}')`
}
})
}
// 实时保存合同头
export function saveContractHeader(...params) {
return request({

View File

@@ -94,8 +94,8 @@
</el-table-column>
<el-table-column label="操作" align="center" width="250px" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.组件是否完成===null || scope.row.组件是否完成===0" type="success" size="small" @click="handlestart_3(scope.row)">开始装配</el-button>
<el-button v-else-if="scope.row.组件是否完成===1" type="danger" size="small" @click="handleend_3(scope.row)">结束装配</el-button>
<el-button v-if="scope.row.buttonStatus === 1" type="success" size="small" @click="handlestart_3(scope.row)">开始装配</el-button>
<el-button v-else-if="scope.row.buttonStatus === 2" type="danger" size="small" @click="handleend_3(scope.row)">结束装配</el-button>
<el-button v-else type="info" size="small" >装配完成</el-button>
</template>
</el-table-column>
@@ -163,6 +163,16 @@ export default {
searchTable2(this.machineNumberValue, this.check2).then(response => {
console.log(response.data, 222)
this.tableData2 = response.data
this.tableData2.map(v => {
if (v.组件是否完成 === null || v.组件是否完成 === 0) {
this.$set(v, 'buttonStatus', 1)
} else if (v.组件是否完成 === 1) {
this.$set(v, 'buttonStatus', 2)
} else {
this.$set(v, 'buttonStatus', 3)
}
return v
})
})
},
// 总装开始装配
@@ -207,7 +217,8 @@ export default {
ComponentStateUpdate(row.组件流水号, 1).then(response => {
console.log(response.data)
this.searchTable1()
this.searchTable2()
row.buttonStatus = 2
// this.searchTable2()
})
},
// 部装结束装配
@@ -216,7 +227,8 @@ export default {
ComponentStateUpdate(row.组件流水号, 2).then(response => {
console.log(response.data)
this.searchTable1()
this.searchTable2()
row.buttonStatus = 3
// this.searchTable2()
})
}
}

View File

@@ -221,13 +221,19 @@
{{ scope.row.领料单备注 }}
</template>
</el-table-column>
<el-table-column v-if="Number(token)===21" label="审批" align="center" min-width="90">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否审批)===1" type="success">已审批</el-tag>
<el-button v-else size="mini" type="primary" plain icon="el-icon-check" @click="approvalPass(scope.row)">审批</el-button>
</template>
</el-table-column>
<el-table-column label="领回确认" align="center" min-width="80">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否启用)===1" type="warning">未确认</el-tag>
<el-tag v-else type="success">已确认</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px">
<el-table-column label="操作" align="center" width="220px">
<template slot-scope="scope" align="center">
<el-button :disabled="Number(scope.row.是否启用)===0" size="mini" type="primary" icon="el-icon-check" @click="checkList(scope.row)">确认</el-button>
<el-button :disabled="Number(scope.row.是否启用)===0" size="mini" type="danger" icon="el-icon-delete" @click="dropList(scope.row)">删除</el-button>
@@ -321,6 +327,7 @@
<script>
import { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail } from '@/api/Inventory/CreatePickingList'
import request from '@/utils/request'
import { mapGetters } from 'vuex'
export default {
name: 'CreatePickingList',
data() {
@@ -362,12 +369,49 @@ export default {
multipleSelection: []
}
},
computed: {
...mapGetters([
'id',
'token'
])
},
mounted() {
this.fetchData()
this.searchTable()
this.searchList()
},
methods: {
// 审批通过
approvalPass(row) {
this.$confirm('是否审批通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const param = {
url: '',
method: 'post',
data: {
type: '4',
name: `update 车间装配管理_领料单 set 是否审批 = 1 where 领料单流水号 = ${row.领料单流水号}`
}
}
request(param).then(res => {
if (res.data[0].result === '1') {
this.$message.success('操作成功')
this.pickingListNumber = ''
this.searchList()
} else {
this.$message.error('操作失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
},
// 初始化数据
fetchData() {
initPickPerson().then(response => {

View File

@@ -72,24 +72,30 @@
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-col :span="21">
<el-form-item label="其他说明:">
<el-input v-model="otherInfo" :disabled="!contractNumValue" size="small" type="textarea" rows="1" @blur="contractHeaderChange"/>
</el-form-item>
</el-col>
<el-col :span="1">
<el-button v-if="quickChangePrice" size="mini" style="margin: 10px 0 0 10px" @click="quickChangePrice=!quickChangePrice">快速修改价格</el-button>
<el-button v-else size="mini" style="margin: 10px 0 0 10px" @click="quickChangePrice=!quickChangePrice">还原</el-button>
</el-col>
</el-row>
</el-form>
<el-table :data="tableData1" border style="margin: 10px 0;max-height: 480px;" height="480px" size="mini" show-summary>
<el-table :data="tableData1" border style="margin: 10px 0;max-height: 480px;" height="480px" size="mini" show-summary tooltip-effect="dark">
<el-table-column label="序号" align="center" width="50" type="index"/>
<el-table-column label="交货期" align="center" width="150">
<template slot-scope="scope">
<el-date-picker
v-if="quickChangePrice"
v-model="scope.row.交货期"
size="mini"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
style="width:100%"/>
<b v-else>{{ scope.row.交货期.split(' ')[0] || '' }}</b>
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="100">
@@ -97,7 +103,7 @@
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="80">
<el-table-column label="组号" align="center" width="70">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
@@ -107,7 +113,7 @@
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" min-width="150">
<el-table-column label="图号或型号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.图号 ? scope.row.图号 : '—' }}
</template>
@@ -122,20 +128,20 @@
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="单位" align="center" width="80">
<el-table-column label="单位" align="center" width="70">
<template slot-scope="scope">
{{ scope.row.计量单位 }}
</template>
</el-table-column>
<el-table-column v-show="hasTax==='未税'" label="单价(未税)" align="center" width="120">
<template slot-scope="scope">
<el-input-number v-show="hasTax==='未税'" :min="0" v-model="scope.row.未税单价" controls-position="right" size="mini" style="width:100%" @focus="scope.row.未税单价=''" @change="priceChange(scope.row.未税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<el-input-number v-show="hasTax==='未税'" :min="0" v-model="scope.row.未税单价" controls-position="right" size="mini" style="width:100%" @change="priceChange(scope.row.未税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<b v-show="hasTax!=='未税'"></b>
</template>
</el-table-column>
<el-table-column v-show="hasTax==='含税'" label="单价(含税)" align="center" width="120">
<template slot-scope="scope">
<el-input-number v-show="hasTax==='含税'" :min="0" v-model="scope.row.含税单价" controls-position="right" size="mini" style="width:100%" @focus="scope.row.含税单价=''" @change="priceChange(scope.row.含税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<el-input-number v-show="hasTax==='含税'" :min="0" v-model="scope.row.含税单价" controls-position="right" size="mini" style="width:100%" @change="priceChange(scope.row.含税单价, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<b v-show="hasTax!=='含税'"></b>
</template>
</el-table-column>
@@ -149,9 +155,10 @@
{{ hasTax==='含税' ? scope.row.含税总额 = (Number(scope.row.数量) * Number(scope.row.含税单价)).toFixed(2) : scope.row.含税总额 = (scope.row.未税总额 * (1+taxRate)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="80">
<el-table-column label="备注" align="center" min-width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备注 }}
<el-input v-if="quickChangePrice" v-model="scope.row.备注" size="mini" style="width:100%" @change="remarkChange(scope.row.备注, scope.row.物料流水号, scope.row.询价单流水号, scope.row, scope.row.零件名称, scope.row.零件图号, scope.row.规格)"/>
<b v-else>{{ scope.row.备注 || '' }}</b>
</template>
</el-table-column>
</el-table>
@@ -185,7 +192,7 @@
<script>
import Tinymce from '@/components/Tinymce'
import { initSupplier, searchInquirySheet, searchSheetContract, doneContract, searchBaseInfo, savePrice, saveContractHeader, searchContractHeader } from '@/api/PurchasingCenter/CreatePurchaseContract'
import { initSupplier, searchInquirySheet, searchSheetContract, doneContract, searchBaseInfo, savePrice, saveContractHeader, searchContractHeader, saveRemark } from '@/api/PurchasingCenter/CreatePurchaseContract'
import { convertCurrency } from '@/vendor/int2Chinese'
import { mapGetters } from 'vuex'
import { sleep, groupBy } from '@/utils/tool'
@@ -196,6 +203,7 @@ export default {
inject: ['reload'],
data() {
return {
quickChangePrice: true,
supplier: [],
year: '',
month: '',
@@ -270,6 +278,37 @@ export default {
})
}
},
// 备注实时保存
remarkChange(remark, num1, num2, row, num3, num4, num5) {
this.tableData1.map(v => {
v.物料流水号 = v.物料流水号 || ''
v.零件名称 = v.零件名称 || ''
v.零件图号 = v.零件图号 || ''
v.规格 = v.规格 || ''
row.物料流水号 = row.物料流水号 || ''
row.零件名称 = row.零件名称 || ''
row.零件图号 = row.零件图号 || ''
row.规格 = row.规格 || ''
if (Number(v.物料流水号) === Number(row.物料流水号) && Number(v.询价单流水号) === Number(row.询价单流水号) && v.零件名称 === row.零件名称 && v.零件图号 === row.零件图号 && v.规格 === row.规格) {
v.备注 = row.备注
}
})
const group = this.tableData1
this.tableData1 = []
this.tableData1 = group
remark = remark || ''
num1 = num1 || ''
num3 = num3 || ''
num4 = num4 || ''
num5 = num5 || ''
saveRemark(remark, num1, num2, num3, num4, num5).then(res => {
if (res.data[0].result === '1') {
console.log('备注实时保存成功')
} else {
console.log('备注实时保存失败')
}
})
},
// 价格实时保存
priceChange(price, num1, num2, row, num3, num4, num5) {
this.tableData1.map(v => {

View File

@@ -355,6 +355,8 @@
</el-tooltip>
<el-input v-model="taxRate" style="float:right;width:100px" placeholder="税率" size="mini"/>
<h4 style="float:right;width: 40px;margin: 5px">税率:</h4>
<el-button v-if="quickChangePrice" size="mini" style="float:right;" @click="quickChangePrice=!quickChangePrice">快速修改价格</el-button>
<el-button v-else size="mini" style="float:right;" @click="quickChangePrice=!quickChangePrice">还原</el-button>
</div>
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 500px;" height="500px" size="mini" show-summary>
<el-table-column label="离线合同编号" align="center" min-width="150">
@@ -369,17 +371,18 @@
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
{{ scope.row.物料规格 || '—' }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
{{ scope.row.物料型号 || '—' }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.数量" :disabled="disable" size="mini" style="width:70px"/>
<el-input v-if="quickChangePrice" v-model="scope.row.数量" :disabled="disable" size="mini" style="width:70px"/>
<b v-else>{{ scope.row.数量 }}</b>
</template>
</el-table-column>
<el-table-column label="单位" align="center" min-width="100">
@@ -416,12 +419,14 @@
</el-table-column>
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
<template slot-scope="scope">
<el-input v-model="scope.row.交货期要求" :disabled="disable" size="mini" style="width:70px"/>
<el-input v-if="quickChangePrice" v-model="scope.row.交货期要求" :disabled="disable" size="mini" style="width:70px"/>
<b v-else>{{ scope.row.交货期要求 || '—' }}</b>
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="150" prop="备注">
<template slot-scope="scope">
<el-input v-model="scope.row.备注" :disabled="disable" size="mini" style="width:120px"/>
<el-input v-if="quickChangePrice" v-model="scope.row.备注" :disabled="disable" size="mini" style="width:120px"/>
<b v-else>{{ scope.row.备注 || '—' }}</b>
</template>
</el-table-column>
<el-table-column v-if="disable" label="到货数量" align="center" min-width="100">
@@ -431,7 +436,8 @@
</el-table-column>
<el-table-column label="操作" align="center" min-width="100">
<template slot-scope="scope">
<el-button :disabled="disable" type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
<el-button v-if="quickChangePrice" :disabled="disable" type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
<b v-else>移除</b>
</template>
</el-table-column>
</el-table>
@@ -692,6 +698,7 @@ export default {
name: '', // 离线合同
data() {
return {
quickChangePrice: true,
hasTax: '含税',
taxRate: 0.13,
source: [