Compare commits
1 Commits
master
...
bns_hongch
| Author | SHA1 | Date |
|---|---|---|
|
|
9f84d8dace |
|
|
@ -10,10 +10,11 @@ export function getListNewBuy(query) {
|
|||
}
|
||||
|
||||
//任务 详情
|
||||
export function getPurchaseCheckInfo(id) {
|
||||
export function getPurchaseCheckInfo(query) {
|
||||
return request({
|
||||
url: '/material/purchase_check_info/'+ id,
|
||||
url: '/material//purchase_check_info/getInfo',
|
||||
method: 'get',
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<el-date-picker
|
||||
v-model="maForm.arrivalTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd hh:mm:ss"
|
||||
:picker-options="pickerOptions"
|
||||
type="date"
|
||||
placeholder="请选择到货日期"
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
<el-date-picker
|
||||
v-model="maForm.productionTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd hh:mm:ss"
|
||||
:picker-options="pickerOptions"
|
||||
type="date"
|
||||
placeholder="请选择出厂日期"
|
||||
|
|
@ -39,7 +39,9 @@
|
|||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="taxRateChange"
|
||||
/>
|
||||
<span>%</span>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="类型规格" prop="deviceType">
|
||||
|
|
@ -114,7 +116,7 @@
|
|||
prop="purchasePrice"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<template v-slot="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.purchasePrice"
|
||||
controls-position="right"
|
||||
|
|
@ -125,15 +127,16 @@
|
|||
</el-table-column>
|
||||
<el-table-column
|
||||
label="购置单价(元不含税)"
|
||||
prop="purchasePrice"
|
||||
prop="purchaseNoPrice"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.purchasePrice"
|
||||
v-model="scope.row.purchaseNoPrice"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
:min="0"
|
||||
@input="purchaseNoPriceChange(scope.row,scope.$index)"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -165,7 +168,7 @@
|
|||
<el-date-picker
|
||||
v-model="scope.row.productionTime"
|
||||
style="width: 100%"
|
||||
value-format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd hh:mm:ss"
|
||||
type="date"
|
||||
range-separator="-"
|
||||
placeholder="出厂日期"
|
||||
|
|
@ -292,6 +295,12 @@ export default {
|
|||
return ''
|
||||
},
|
||||
},
|
||||
editId: {
|
||||
type: [String, Number],
|
||||
default: () => {
|
||||
return ''
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -337,6 +346,7 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
id:undefined,
|
||||
taskId:undefined,
|
||||
typesList:[],
|
||||
},
|
||||
// 数据范围选项
|
||||
|
|
@ -373,6 +383,7 @@ export default {
|
|||
supplierId: '',
|
||||
},
|
||||
maForm: {
|
||||
taxRate:0,
|
||||
purchaseTime: '',
|
||||
arrivalTime: '',
|
||||
purchaser: '',
|
||||
|
|
@ -414,6 +425,7 @@ export default {
|
|||
},
|
||||
deviceType: [],
|
||||
propsKey: 1000,
|
||||
taxRate:0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -435,18 +447,11 @@ export default {
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
// const taskId = this.$route.query && this.$route.query.taskId
|
||||
// this.taskId = taskId
|
||||
// if (this.taskId == '' || !this.taskId) {
|
||||
// this.isEdit = false
|
||||
// } else if (this.taskId != '') {
|
||||
// this.isEdit = true
|
||||
// this.getTaskInfo()
|
||||
// }
|
||||
|
||||
if (this.isEdit) {
|
||||
console.log('isEdit',this.isEdit)
|
||||
this.id = this.editTaskId
|
||||
this.taskId = this.editTaskId
|
||||
this.id = this.editId
|
||||
this.getTaskInfo()
|
||||
}
|
||||
|
||||
|
|
@ -456,7 +461,15 @@ export default {
|
|||
// this.supplierInfoList()
|
||||
},
|
||||
methods: {
|
||||
|
||||
taxRateChange(val){
|
||||
this.equipmentList.forEach(item=>{
|
||||
item.purchasePrice = item.purchaseNoPrice*(1 + val/100)
|
||||
})
|
||||
},
|
||||
purchaseNoPriceChange(row,val){
|
||||
this.equipmentList[val].purchasePrice = row.purchaseNoPrice*(1 + this.maForm.taxRate/100)
|
||||
row.purchasePrice = row.purchaseNoPrice*(1 + this.maForm.taxRate/100)
|
||||
},
|
||||
|
||||
getParentsById(list, id) {
|
||||
for (let i in list) {
|
||||
|
|
@ -506,7 +519,7 @@ export default {
|
|||
item4.specificationType =
|
||||
item4.typeName
|
||||
this.$set(item4, 'purchasePrice', 0)
|
||||
this.$set(item4, 'purchaseNum', 1)
|
||||
this.$set(item4, 'purchaseNoPrice', 0)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
@ -567,13 +580,14 @@ export default {
|
|||
//获取任务详情--- 编辑回显数据
|
||||
getTaskInfo() {
|
||||
// this.loading = true;
|
||||
getPurchaseCheckInfo(this.id).then((response) => {
|
||||
getPurchaseCheckInfo({taskId:this.taskId,id:this.id}).then((response) => {
|
||||
// this.taskInfo = response.data
|
||||
this.maForm.purchaseTime = response.data.purchaseTime
|
||||
this.maForm.arrivalTime = response.data.arrivalTime
|
||||
this.maForm.purchaser = response.data.purchaser
|
||||
this.maForm.remark = response.data.remark
|
||||
this.maForm.purchaseNumber = response.data.purchaseNumber
|
||||
this.maForm.arrivalTime = response.data.purchaseCheckInfo.arrivalTime
|
||||
// this.maForm.purchaser = response.data.purchaser
|
||||
this.maForm.remark = response.data.purchaseCheckInfo.remark
|
||||
// this.maForm.purchaseNumber = response.data.purchaseNumber
|
||||
this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime
|
||||
this.equipmentList = response.data.purchaseCheckDetailsList
|
||||
|
||||
// this.loading = false;
|
||||
|
|
@ -706,7 +720,7 @@ export default {
|
|||
console.log('新增')
|
||||
this.loading = true
|
||||
addPurchaseCheckInfo(
|
||||
// {purchaseCheckDetailsList: this.maForm.checkDetailsList,purchaseCheckInfo:}
|
||||
{purchaseCheckDetailsList: this.maForm.checkDetailsList,purchaseCheckInfo:this.maForm}
|
||||
).then((response) => {
|
||||
if (response.code == 200) {
|
||||
this.$modal.msgSuccess(
|
||||
|
|
|
|||
|
|
@ -668,11 +668,11 @@ export default {
|
|||
},
|
||||
/** 查看按钮操作 */
|
||||
handleView(row) {
|
||||
this.$emit('queryTools', row.taskId)
|
||||
this.$emit('queryTools', row.taskId,row.id)
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.$emit('editTools', row.taskId)
|
||||
this.$emit('editTools', row.taskId, row.id)
|
||||
},
|
||||
|
||||
//----消息通知
|
||||
|
|
|
|||
|
|
@ -541,6 +541,12 @@ export default {
|
|||
return ''
|
||||
},
|
||||
},
|
||||
queryId: {
|
||||
type: [String, Number],
|
||||
default: () => {
|
||||
return ''
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -599,6 +605,7 @@ export default {
|
|||
uploadUrl: process.env.VUE_APP_BASE_API + '/system', // 上传的图片服务器地址
|
||||
dialogImageUrl: '',
|
||||
dialogVisible: false,
|
||||
taskId:undefined,
|
||||
//--------------
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -703,8 +710,8 @@ export default {
|
|||
// } else {
|
||||
// this.isView = false
|
||||
// }
|
||||
this.id = this.queryTaskId
|
||||
|
||||
this.taskId = this.queryTaskId
|
||||
this.id = this.queryId
|
||||
this.getTaskInfo()
|
||||
// this.getAllUserList()
|
||||
// this.getNoticeUserList()
|
||||
|
|
@ -713,7 +720,7 @@ export default {
|
|||
//获取任务详情-列表数据
|
||||
getTaskInfo() {
|
||||
this.loading = true
|
||||
getPurchaseCheckInfo(this.id).then((response) => {
|
||||
getPurchaseCheckInfo({taskId:this.taskId,id:this.id}).then((response) => {
|
||||
this.taskInfo = response.data
|
||||
this.equipmentList = response.data.purchaseCheckDetailsList
|
||||
// this.equipmentList.forEach((item) => {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@
|
|||
:is="isShowComponent"
|
||||
:isEdit="isEdit"
|
||||
:editTaskId="editTaskId"
|
||||
:editId="editId"
|
||||
:queryTaskId="queryTaskId"
|
||||
:queryId="queryId"
|
||||
:isView="isView"
|
||||
:codingTaskId="codingTaskId"
|
||||
@addTools="addTools"
|
||||
|
|
@ -39,6 +41,7 @@ export default {
|
|||
pageContent: "新增机具",
|
||||
isEdit: false,
|
||||
editTaskId: "",
|
||||
editId: "",
|
||||
queryTaskId: "",
|
||||
isView: false,
|
||||
codingTaskId: "",
|
||||
|
|
@ -59,17 +62,19 @@ export default {
|
|||
this.isShowComponent = 'Home'
|
||||
},
|
||||
/* 编辑工机具 */
|
||||
editTools(id) {
|
||||
editTools(taskId,id) {
|
||||
this.isEdit = true
|
||||
this.pageContent = '编辑机具'
|
||||
this.editTaskId = id
|
||||
this.editTaskId = taskId
|
||||
this.editId = id
|
||||
this.isShowComponent = 'AddTools'
|
||||
},
|
||||
/* 查询工机具 */
|
||||
queryTools(id) {
|
||||
queryTools(taskId,id) {
|
||||
this.isView = true
|
||||
this.pageContent = '详情信息'
|
||||
this.queryTaskId = id
|
||||
this.queryTaskId = taskId
|
||||
this.queryId = id
|
||||
this.isShowComponent = 'QueryTools'
|
||||
},
|
||||
/* 返回按钮 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue