|
@@ -249,7 +249,7 @@
|
|
|
clearable
|
|
|
transfer
|
|
|
v-show="!isCheck&&row.project_number!=='查看'"
|
|
|
- @on-change='selectChange(row,index)'
|
|
|
+ @on-change='selectChangeCoding(row,index)'
|
|
|
filterable
|
|
|
label-in-value
|
|
|
>
|
|
@@ -272,7 +272,7 @@
|
|
|
size="small"
|
|
|
clearable
|
|
|
transfer
|
|
|
- @on-change='selectChange(row,index)'
|
|
|
+ @on-change='selectChangeName(row,index)'
|
|
|
v-show="!isCheck&&row.project_number!=='查看'"
|
|
|
filterable
|
|
|
label-in-value
|
|
@@ -679,6 +679,7 @@ export default {
|
|
|
},
|
|
|
on: {
|
|
|
'on-change': (e) => {
|
|
|
+ debugger
|
|
|
currentRow.no_tax_price = e.target.value
|
|
|
currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
|
|
|
currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
@@ -891,11 +892,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
'on-focus':()=>{
|
|
|
- if(this.$route.query.type==6||this.$route.query.type==3||this.$route.query.type==1){
|
|
|
- currentRow.tax_amount = (currentRow.tax_amount*1).toFixed(2);
|
|
|
- this.tableData.splice(index,1,currentRow)
|
|
|
+ // if(this.$route.query.type==6||this.$route.query.type==3||this.$route.query.type==1){
|
|
|
+ // currentRow.tax_amount = (currentRow.tax_amount*1).toFixed(2);
|
|
|
+ // this.tableData.splice(index,1,currentRow)
|
|
|
|
|
|
- }else{
|
|
|
+ // }else{
|
|
|
// currentRow.tax_amount = ''
|
|
|
// currentRow.fax = (1 * currentRow.tax_amount / currentRow.no_tax_price).toFixed(2)
|
|
|
// currentRow.no_tax_amount = (1*(currentRow.total_price-currentRow.tax_amount)).toFixed(2)
|
|
@@ -904,7 +905,7 @@ export default {
|
|
|
currentRow.change = true;
|
|
|
}
|
|
|
this.tableData.splice(index, 1, currentRow);}
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
},this.tableData[index].tax_amount)
|
|
|
}
|
|
@@ -1102,6 +1103,7 @@ export default {
|
|
|
order_no:'',
|
|
|
suppliersList:[],
|
|
|
ext_tax_rate:0,
|
|
|
+ matchingList:[]
|
|
|
}
|
|
|
},
|
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
@@ -1133,6 +1135,11 @@ export default {
|
|
|
this.initModal()
|
|
|
this.initProjectModal()
|
|
|
this.initSupplierModal(this.modalSupplierData)
|
|
|
+ this.axios({ method: "get", url: "/api/purchase_orders_list" })
|
|
|
+ .then((res) => {
|
|
|
+ this.matchingList = res.data.list
|
|
|
+ })
|
|
|
+ .catch((err) => {});
|
|
|
},
|
|
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted () {
|
|
@@ -1169,6 +1176,26 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ selectChangeCoding(row,index){
|
|
|
+ if(!row.copy&&!row.edit){
|
|
|
+ this.tableData[index].change = true;
|
|
|
+ }
|
|
|
+ this.matchingList.forEach(e=>{
|
|
|
+ if( this.tableData[index].project_code == e.project_number){
|
|
|
+ this.tableData[index].project_title = e.project_name
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ selectChangeName(row,index){
|
|
|
+ if(!row.copy&&!row.edit){
|
|
|
+ this.tableData[index].change = true;
|
|
|
+ }
|
|
|
+ this.matchingList.forEach(e=>{
|
|
|
+ if( this.tableData[index].project_title == e.project_name){
|
|
|
+ this.tableData[index].project_code = e.project_number
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
selectMaterial(row){
|
|
|
this.clickMaterial = JSON.parse(JSON.stringify(row));
|
|
|
this.showModal = true;
|