Compare commits

..

No commits in common. "bns_hongchao" and "master" have entirely different histories.

5 changed files with 34 additions and 61 deletions

View File

@ -10,11 +10,10 @@ export function getListNewBuy(query) {
} }
//任务 详情 //任务 详情
export function getPurchaseCheckInfo(query) { export function getPurchaseCheckInfo(id) {
return request({ return request({
url: '/material//purchase_check_info/getInfo', url: '/material/purchase_check_info/'+ id,
method: 'get', method: 'get',
params: query,
}) })
} }

View File

@ -13,7 +13,7 @@
<el-date-picker <el-date-picker
v-model="maForm.arrivalTime" v-model="maForm.arrivalTime"
style="width: 240px" style="width: 240px"
value-format="yyyy-MM-dd hh:mm:ss" value-format="yyyy-MM-dd"
:picker-options="pickerOptions" :picker-options="pickerOptions"
type="date" type="date"
placeholder="请选择到货日期" placeholder="请选择到货日期"
@ -24,7 +24,7 @@
<el-date-picker <el-date-picker
v-model="maForm.productionTime" v-model="maForm.productionTime"
style="width: 240px" style="width: 240px"
value-format="yyyy-MM-dd hh:mm:ss" value-format="yyyy-MM-dd"
:picker-options="pickerOptions" :picker-options="pickerOptions"
type="date" type="date"
placeholder="请选择出厂日期" placeholder="请选择出厂日期"
@ -39,9 +39,7 @@
maxlength="50" maxlength="50"
style="width: 240px" style="width: 240px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@input="taxRateChange"
/> />
<span>%</span>
</el-form-item> </el-form-item>
<el-form-item label="类型规格" prop="deviceType"> <el-form-item label="类型规格" prop="deviceType">
@ -116,7 +114,7 @@
prop="purchasePrice" prop="purchasePrice"
align="center" align="center"
> >
<template v-slot="scope"> <template slot-scope="scope">
<el-input-number <el-input-number
v-model="scope.row.purchasePrice" v-model="scope.row.purchasePrice"
controls-position="right" controls-position="right"
@ -127,16 +125,15 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="购置单价(元不含税)" label="购置单价(元不含税)"
prop="purchaseNoPrice" prop="purchasePrice"
align="center" align="center"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number <el-input-number
v-model="scope.row.purchaseNoPrice" v-model="scope.row.purchasePrice"
controls-position="right" controls-position="right"
style="width: 100%" style="width: 100%"
:min="0" :min="0"
@input="purchaseNoPriceChange(scope.row,scope.$index)"
></el-input-number> ></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
@ -168,7 +165,7 @@
<el-date-picker <el-date-picker
v-model="scope.row.productionTime" v-model="scope.row.productionTime"
style="width: 100%" style="width: 100%"
value-format="yyyy-MM-dd hh:mm:ss" value-format="yyyy-MM-dd"
type="date" type="date"
range-separator="-" range-separator="-"
placeholder="出厂日期" placeholder="出厂日期"
@ -295,12 +292,6 @@ export default {
return '' return ''
}, },
}, },
editId: {
type: [String, Number],
default: () => {
return ''
},
},
}, },
data() { data() {
return { return {
@ -346,7 +337,6 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
id:undefined, id:undefined,
taskId:undefined,
typesList:[], typesList:[],
}, },
// //
@ -383,7 +373,6 @@ export default {
supplierId: '', supplierId: '',
}, },
maForm: { maForm: {
taxRate:0,
purchaseTime: '', purchaseTime: '',
arrivalTime: '', arrivalTime: '',
purchaser: '', purchaser: '',
@ -425,7 +414,6 @@ export default {
}, },
deviceType: [], deviceType: [],
propsKey: 1000, propsKey: 1000,
taxRate:0,
} }
}, },
computed: { computed: {
@ -447,11 +435,18 @@ export default {
}, },
}, },
mounted() { 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) { if (this.isEdit) {
console.log('isEdit',this.isEdit) console.log('isEdit',this.isEdit)
this.taskId = this.editTaskId this.id = this.editTaskId
this.id = this.editId
this.getTaskInfo() this.getTaskInfo()
} }
@ -461,15 +456,7 @@ export default {
// this.supplierInfoList() // this.supplierInfoList()
}, },
methods: { 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) { getParentsById(list, id) {
for (let i in list) { for (let i in list) {
@ -519,7 +506,7 @@ export default {
item4.specificationType = item4.specificationType =
item4.typeName item4.typeName
this.$set(item4, 'purchasePrice', 0) this.$set(item4, 'purchasePrice', 0)
this.$set(item4, 'purchaseNoPrice', 0) this.$set(item4, 'purchaseNum', 1)
}) })
} }
}) })
@ -580,14 +567,13 @@ export default {
//--- //---
getTaskInfo() { getTaskInfo() {
// this.loading = true; // this.loading = true;
getPurchaseCheckInfo({taskId:this.taskId,id:this.id}).then((response) => { getPurchaseCheckInfo(this.id).then((response) => {
// this.taskInfo = response.data // this.taskInfo = response.data
this.maForm.purchaseTime = response.data.purchaseTime this.maForm.purchaseTime = response.data.purchaseTime
this.maForm.arrivalTime = response.data.purchaseCheckInfo.arrivalTime this.maForm.arrivalTime = response.data.arrivalTime
// this.maForm.purchaser = response.data.purchaser this.maForm.purchaser = response.data.purchaser
this.maForm.remark = response.data.purchaseCheckInfo.remark this.maForm.remark = response.data.remark
// this.maForm.purchaseNumber = response.data.purchaseNumber this.maForm.purchaseNumber = response.data.purchaseNumber
this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime
this.equipmentList = response.data.purchaseCheckDetailsList this.equipmentList = response.data.purchaseCheckDetailsList
// this.loading = false; // this.loading = false;
@ -720,7 +706,7 @@ export default {
console.log('新增') console.log('新增')
this.loading = true this.loading = true
addPurchaseCheckInfo( addPurchaseCheckInfo(
{purchaseCheckDetailsList: this.maForm.checkDetailsList,purchaseCheckInfo:this.maForm} // {purchaseCheckDetailsList: this.maForm.checkDetailsList,purchaseCheckInfo:}
).then((response) => { ).then((response) => {
if (response.code == 200) { if (response.code == 200) {
this.$modal.msgSuccess( this.$modal.msgSuccess(

View File

@ -668,11 +668,11 @@ export default {
}, },
/** 查看按钮操作 */ /** 查看按钮操作 */
handleView(row) { handleView(row) {
this.$emit('queryTools', row.taskId,row.id) this.$emit('queryTools', row.taskId)
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.$emit('editTools', row.taskId, row.id) this.$emit('editTools', row.taskId)
}, },
//---- //----

View File

@ -541,12 +541,6 @@ export default {
return '' return ''
}, },
}, },
queryId: {
type: [String, Number],
default: () => {
return ''
},
},
}, },
data() { data() {
return { return {
@ -605,7 +599,6 @@ export default {
uploadUrl: process.env.VUE_APP_BASE_API + '/system', // uploadUrl: process.env.VUE_APP_BASE_API + '/system', //
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
taskId:undefined,
//-------------- //--------------
// //
form: {}, form: {},
@ -710,8 +703,8 @@ export default {
// } else { // } else {
// this.isView = false // this.isView = false
// } // }
this.taskId = this.queryTaskId this.id = this.queryTaskId
this.id = this.queryId
this.getTaskInfo() this.getTaskInfo()
// this.getAllUserList() // this.getAllUserList()
// this.getNoticeUserList() // this.getNoticeUserList()
@ -720,7 +713,7 @@ export default {
//- //-
getTaskInfo() { getTaskInfo() {
this.loading = true this.loading = true
getPurchaseCheckInfo({taskId:this.taskId,id:this.id}).then((response) => { getPurchaseCheckInfo(this.id).then((response) => {
this.taskInfo = response.data this.taskInfo = response.data
this.equipmentList = response.data.purchaseCheckDetailsList this.equipmentList = response.data.purchaseCheckDetailsList
// this.equipmentList.forEach((item) => { // this.equipmentList.forEach((item) => {

View File

@ -10,9 +10,7 @@
:is="isShowComponent" :is="isShowComponent"
:isEdit="isEdit" :isEdit="isEdit"
:editTaskId="editTaskId" :editTaskId="editTaskId"
:editId="editId"
:queryTaskId="queryTaskId" :queryTaskId="queryTaskId"
:queryId="queryId"
:isView="isView" :isView="isView"
:codingTaskId="codingTaskId" :codingTaskId="codingTaskId"
@addTools="addTools" @addTools="addTools"
@ -41,7 +39,6 @@ export default {
pageContent: "新增机具", pageContent: "新增机具",
isEdit: false, isEdit: false,
editTaskId: "", editTaskId: "",
editId: "",
queryTaskId: "", queryTaskId: "",
isView: false, isView: false,
codingTaskId: "", codingTaskId: "",
@ -62,19 +59,17 @@ export default {
this.isShowComponent = 'Home' this.isShowComponent = 'Home'
}, },
/* 编辑工机具 */ /* 编辑工机具 */
editTools(taskId,id) { editTools(id) {
this.isEdit = true this.isEdit = true
this.pageContent = '编辑机具' this.pageContent = '编辑机具'
this.editTaskId = taskId this.editTaskId = id
this.editId = id
this.isShowComponent = 'AddTools' this.isShowComponent = 'AddTools'
}, },
/* 查询工机具 */ /* 查询工机具 */
queryTools(taskId,id) { queryTools(id) {
this.isView = true this.isView = true
this.pageContent = '详情信息' this.pageContent = '详情信息'
this.queryTaskId = taskId this.queryTaskId = id
this.queryId = id
this.isShowComponent = 'QueryTools' this.isShowComponent = 'QueryTools'
}, },
/* 返回按钮 */ /* 返回按钮 */