|
|
@@ -15,7 +15,7 @@
|
|
|
<Select v-model="formData.order_no" filterable clearable style="width:200px" >
|
|
|
<Option v-for="(item,index) in projectTitleList" :key="index" :value="item.project_number" :label="item.project_name"></Option>
|
|
|
</Select>
|
|
|
- <Button type="primary" @click="showProjectModal=true">选择项目</Button>
|
|
|
+ <Button style="margin-left:20px" type="primary" @click="showProjectModal=true">选择项目</Button>
|
|
|
</div>
|
|
|
</FormItem>
|
|
|
<FormItem label='供应商:' style="width:400px">
|
|
|
@@ -23,7 +23,7 @@
|
|
|
<div v-else style='display:flex;width:300px'>
|
|
|
<Select filterable clearable v-model="formData.supply_id" >
|
|
|
<Option v-for="(item,index) in suppliersList" :key="index" :value="item.id" :label="item.title"></Option>
|
|
|
- </Select><Button type="primary" @click="showSupplierModal=true">选择供应商</Button>
|
|
|
+ </Select><Button type="primary" style="margin-left:20px" @click="showSupplierModal=true">选择供应商</Button>
|
|
|
</div>
|
|
|
</FormItem>
|
|
|
<FormItem label="制单日期:" style="width:400px">
|
|
|
@@ -46,10 +46,10 @@
|
|
|
<Input v-model="tableData[index].name" placeholder="请输入费用内容" @on-focus='handleFocusName(index)'/>
|
|
|
</template>
|
|
|
<template slot="price" slot-scope="{index}">
|
|
|
- <Input v-model="tableData[index].price" @on-change='changePrice($event,index)' @on-blur='priceBlur(index)' type="number"/>
|
|
|
+ <Input v-model="tableData[index].price" @on-change='changePrice($event,index)' @on-focus="priceFocus(index)" @on-blur='priceBlur(index)' type="number"/>
|
|
|
</template>
|
|
|
<template slot="total_price" slot-scope="{index}">
|
|
|
- <Input v-model="tableData[index].total_price" @on-change='changeTotalPrice($event,index)' @on-blur='priceBlur(index)' type="number"/>
|
|
|
+ <Input v-model="tableData[index].total_price" @on-change='changeTotalPrice($event,index)' @on-focus="totalPriceFocus(index)" @on-blur='totalPriceBlur(index)' type="number"/>
|
|
|
</template>
|
|
|
<template slot="num" slot-scope="{index}">
|
|
|
<Input v-model="tableData[index].num" @on-change='changeNum($event,index)' @on-blur='priceBlurNum(index)' @on-focus='handleFocusNum(index)' type="number"/>
|
|
|
@@ -505,6 +505,13 @@ export default {
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ // totalPriceBlur(index),
|
|
|
+ priceFocus(index){
|
|
|
+ this.tableData[index].price = ''
|
|
|
+ },
|
|
|
+ totalPriceFocus(index){
|
|
|
+ this.tableData[index].total_price = ''
|
|
|
+ },
|
|
|
priceBlurNum(index){
|
|
|
if(this.tableData[index].num<0||this.tableData[index].num===''){
|
|
|
this.tableData[index].num = 0;
|
|
|
@@ -515,7 +522,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
back(){
|
|
|
- this.$router.go(-1);
|
|
|
+ this.$Modal.confirm({
|
|
|
+ title: '是否确认取消',
|
|
|
+
|
|
|
+ onOk: () => {
|
|
|
+ this.$router.go(-1);
|
|
|
+ },
|
|
|
+ onCancel: () => {
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
},
|
|
|
postData(){
|
|
|
let obj =JSON.parse(JSON.stringify(this.formData));
|