新购到货-新增1
This commit is contained in:
parent
1a16d8d016
commit
39a97186b0
|
|
@ -19,7 +19,23 @@
|
|||
placeholder="请选择到货日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="物资厂家" prop="supplierId">
|
||||
<el-select
|
||||
v-model="maForm.supplierId"
|
||||
placeholder="物资厂家"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
@change="changeSupplier"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplierList"
|
||||
:key="item.supplierId"
|
||||
:label="item.supplier"
|
||||
:value="item.supplierId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出厂日期" prop="productionTime">
|
||||
<el-date-picker
|
||||
v-model="maForm.productionTime"
|
||||
|
|
@ -40,7 +56,6 @@
|
|||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
@input="taxRateChange"
|
||||
|
||||
/>
|
||||
<span>%</span>
|
||||
</el-form-item>
|
||||
|
|
@ -85,7 +100,7 @@
|
|||
:data="equipmentList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="序号"
|
||||
|
|
@ -106,37 +121,52 @@
|
|||
/>
|
||||
<el-table-column align="center" label="单位" prop="unitName" />
|
||||
<el-table-column
|
||||
label="购置单价(元含税)"
|
||||
prop="purchasePrice"
|
||||
label="采购数量"
|
||||
prop="purchaseNum"
|
||||
align="center"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.purchasePrice"
|
||||
v-model="scope.row.purchaseNum"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
:min="0"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="购置单价(元含税)"
|
||||
prop="purchaseTaxPrice"
|
||||
align="center"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.purchaseTaxPrice"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
:min="0"
|
||||
@change="purchaseTaxPriceChange(scope.row,scope.$index)"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="购置单价(元不含税)"
|
||||
prop="purchaseNoPrice"
|
||||
prop="purchasePrice"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
v-model="scope.row.purchaseNoPrice"
|
||||
v-model="scope.row.purchasePrice"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
:min="0"
|
||||
@input="purchaseNoPriceChange(scope.row,scope.$index)"
|
||||
@input="purchasePriceChange(scope.row,scope.$index)"
|
||||
></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
label="是否为固定资产"
|
||||
prop="productionTime"
|
||||
prop=""
|
||||
align="center"
|
||||
width="200"
|
||||
>
|
||||
|
|
@ -147,10 +177,18 @@
|
|||
filterable
|
||||
clearable
|
||||
>
|
||||
<el-option label="是" value="0"></el-option>
|
||||
<el-option label="否" value="1"></el-option>
|
||||
<el-option label="是" value="0"></el-option>
|
||||
<el-option label="否" value="1"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="物资厂家" prop="supplierId" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.supplierId" placeholder="物资厂家" filterable clearable style="width: 180px">
|
||||
<el-option v-for="item in supplierList" :key="item.supplierId" :label="item.supplier"
|
||||
:value="item.supplierId" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="出厂日期"
|
||||
|
|
@ -240,7 +278,7 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- <pagination
|
||||
<pagination
|
||||
v-show="totalTwo>0"
|
||||
:total="totalTwo"
|
||||
:page.sync="queryGt.pageNum"
|
||||
|
|
@ -262,9 +300,10 @@ import {
|
|||
equipmentTypeTree,
|
||||
addPurchaseCheckInfo,
|
||||
updatePurchaseCheckInfo,
|
||||
} from '@/api/purchase/goodsArrived'
|
||||
} from '@/api/purchase/goodsArrived';
|
||||
import { getListFacturer } from '@/api/ma/supplier';
|
||||
// import { getUserByRoleList } from '@/api/system/user'
|
||||
// import { equipmentTypeTree, supplierInfoList } from '@/api/store/tools'
|
||||
|
||||
// import Treeselect from '@riophae/vue-treeselect'
|
||||
// import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
// import HoldingpoleDialog from '@/components/HoldingpoleDialog/index.vue'
|
||||
|
|
@ -312,7 +351,7 @@ export default {
|
|||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
//机具厂家(供应商管理)
|
||||
//物资厂家
|
||||
supplierList: [],
|
||||
//机具类型
|
||||
equipmentTypeList: [],
|
||||
|
|
@ -376,7 +415,7 @@ export default {
|
|||
supplierId: '',
|
||||
},
|
||||
maForm: {
|
||||
taxRate:0,
|
||||
taxRate:13,
|
||||
purchaseTime: '',
|
||||
arrivalTime: '',
|
||||
purchaser: '',
|
||||
|
|
@ -418,7 +457,7 @@ export default {
|
|||
},
|
||||
deviceType: [],
|
||||
propsKey: 1000,
|
||||
taxRate:0,
|
||||
// taxRate:0,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -440,29 +479,32 @@ export default {
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.equipmentType()
|
||||
this.supplierInfoList()
|
||||
if (this.isEdit) {
|
||||
console.log('isEdit',this.isEdit)
|
||||
this.taskId = this.editTaskId
|
||||
this.id = this.editId
|
||||
this.getTaskInfo()
|
||||
}
|
||||
|
||||
// this.getUserList()
|
||||
// this.getList();
|
||||
this.equipmentType()
|
||||
// this.supplierInfoList()
|
||||
|
||||
},
|
||||
methods: {
|
||||
taxRateChange(val){
|
||||
this.maForm.taxRate = val.replace(/[^\d.]/g,'')
|
||||
this.equipmentList.forEach(item=>{
|
||||
item.purchasePrice = item.purchaseNoPrice*(1 + val/100)
|
||||
item.purchaseTaxPrice = item.purchasePrice*(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)
|
||||
purchaseTaxPriceChange(row,val){
|
||||
// this.equipmentList[val].purchasePrice = (row.purchaseTaxPrice/(1 + this.maForm.taxRate/100)).toFixed(2)
|
||||
row.purchasePrice = (row.purchaseTaxPrice/(1 + this.maForm.taxRate/100)).toFixed(2)
|
||||
},
|
||||
purchasePriceChange(row,val){
|
||||
// this.equipmentList[val].purchaseTaxPrice = (row.purchasePrice*(1 + this.maForm.taxRate/100)).toFixed(2)
|
||||
row.purchaseTaxPrice = (row.purchasePrice*(1 + this.maForm.taxRate/100)).toFixed(2)
|
||||
},
|
||||
|
||||
getParentsById(list, id) {
|
||||
|
|
@ -488,9 +530,14 @@ export default {
|
|||
this.userList = response.data
|
||||
})
|
||||
},
|
||||
/** 机具厂家 */
|
||||
/** 物资厂家 */
|
||||
supplierInfoList() {
|
||||
supplierInfoList().then((response) => {
|
||||
let param = {
|
||||
pageNum: 1,
|
||||
pageSize: 100,
|
||||
keyWord:undefined
|
||||
}
|
||||
getListFacturer(param).then((response) => {
|
||||
this.supplierList = response.rows
|
||||
})
|
||||
},
|
||||
|
|
@ -512,8 +559,8 @@ export default {
|
|||
item3.typeName
|
||||
item4.specificationType =
|
||||
item4.typeName
|
||||
this.$set(item4, 'purchaseTaxPrice', 0)
|
||||
this.$set(item4, 'purchasePrice', 0)
|
||||
this.$set(item4, 'purchaseNoPrice', 0)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
@ -552,17 +599,18 @@ export default {
|
|||
this.$set(row, 'createTime', null)
|
||||
this.$set(row, 'productionTime', '')
|
||||
// this.$set(row, 'supplierId', '')
|
||||
this.$set(row, 'purchaseTaxPrice', 0)
|
||||
this.$set(row, 'purchasePrice', 0)
|
||||
this.$set(row, 'purchaseNum', 1)
|
||||
this.equipmentList.unshift(row)
|
||||
}
|
||||
},
|
||||
//选择机具厂家
|
||||
// changeSupplier(supplierId) {
|
||||
// this.equipmentList.forEach((item) => {
|
||||
// this.$set(item, 'supplierId', supplierId)
|
||||
// })
|
||||
// },
|
||||
//选择物资厂家
|
||||
changeSupplier(supplierId) {
|
||||
this.equipmentList.forEach((item) => {
|
||||
this.$set(item, 'supplierId', supplierId)
|
||||
})
|
||||
},
|
||||
//选择出厂日期
|
||||
changeTime(time) {
|
||||
console.log(time)
|
||||
|
|
@ -580,10 +628,11 @@ export default {
|
|||
this.maForm.arrivalTime = response.data.purchaseCheckInfo.arrivalTime
|
||||
// this.maForm.purchaser = response.data.purchaser
|
||||
this.maForm.remark = response.data.purchaseCheckInfo.remark
|
||||
this.maForm.taxRate = response.data.purchaseCheckInfo.taxRate
|
||||
// this.maForm.purchaseNumber = response.data.purchaseNumber
|
||||
this.maForm.productionTime = response.data.purchaseCheckInfo.productionTime
|
||||
this.equipmentList = response.data.purchaseCheckDetailsList
|
||||
|
||||
console.log(this.equipmentList)
|
||||
// this.loading = false;
|
||||
})
|
||||
},
|
||||
|
|
@ -814,8 +863,9 @@ export default {
|
|||
obj.supplierId = ''
|
||||
obj.createTime = null
|
||||
obj.productionTime = ''
|
||||
obj.purchasePrice = 0
|
||||
obj.purchaseNum = ''
|
||||
obj.purchaseTaxPrice = 0
|
||||
obj.purchaseTaxPrice = 0
|
||||
obj.purchaseNum = 1
|
||||
tempList.push(obj)
|
||||
break
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@
|
|||
<el-table-column
|
||||
label="采购价格(元不含税)"
|
||||
align="center"
|
||||
prop="purchaseNoTaxPrice"
|
||||
prop="purchasePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
|
|||
Loading…
Reference in New Issue