|
@@ -549,7 +549,7 @@
|
|
|
<el-input id="editExpenseTypeDataInput" size="medium" v-model="editExpenseTypeData.name" :placeholder="$t('customizethfeetypename')" style="width:90%" @keyup.native="editExpenseTypeDataInput('editExpenseTypeDataInput')"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="对应成本项" style="margin:30px 0" prop="basecostSettingId">
|
|
|
- <el-select v-model="editExpenseTypeData.basecostSettingId" size="medium" style="width:90%">
|
|
|
+ <el-select v-model="editExpenseTypeData.basecostSettingId" size="medium" style="width:90%" clearable>
|
|
|
<el-option v-for="item in basecostSettingList" :key="item.id" :label="item.name" :value="item.id" :disabled="item.alarmType == 1"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -1157,7 +1157,6 @@ export default {
|
|
|
this.displayTable = true;
|
|
|
},
|
|
|
present(){
|
|
|
- this.dialog = false
|
|
|
this.adds();
|
|
|
},
|
|
|
// 删除操作
|
|
@@ -1168,9 +1167,8 @@ export default {
|
|
|
this.kan()
|
|
|
},
|
|
|
adds() {
|
|
|
- // happenDate
|
|
|
- // console.log(this.ParticularsList.invoiceList, '123')
|
|
|
- var spl = this.ParticularsList.invoiceList
|
|
|
+ var paramData = JSON.parse(JSON.stringify(this.ParticularsList));
|
|
|
+ var spl = paramData.invoiceList
|
|
|
for(var i in spl) {
|
|
|
if(spl[i].pic) {
|
|
|
if(spl[i].pic[0].name) {
|
|
@@ -1178,32 +1176,32 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // console.log(spl)
|
|
|
- // return
|
|
|
- this.ParticularsList.items = JSON.stringify(this.ParticularsList.invoiceList)//这里要传发票列表的json转string
|
|
|
+ paramData.items = JSON.stringify(paramData.invoiceList)//这里要传发票列表的json转string
|
|
|
|
|
|
- delete this.ParticularsList.invoiceList
|
|
|
- this.http.post('/expense-sheet/add', this.ParticularsList,
|
|
|
- res => {
|
|
|
- if (res.code == "ok") {
|
|
|
- this.bills(this.isAuditList);
|
|
|
- this.$message({
|
|
|
- message: this.$t('editsuccess'),
|
|
|
- type: "success"
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error"
|
|
|
- });
|
|
|
- });
|
|
|
+ delete paramData.invoiceList
|
|
|
+
|
|
|
+ this.http.post('/expense-sheet/add', paramData,
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.dialog = false;
|
|
|
+ this.bills(this.isAuditList);
|
|
|
+ this.$message({
|
|
|
+ message: this.$t('editsuccess'),
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
// 获取人员信息
|
|
@@ -1288,15 +1286,6 @@ export default {
|
|
|
}
|
|
|
// return
|
|
|
this.add();
|
|
|
- this.addForm = {
|
|
|
- code:null,
|
|
|
- ownerId:this.user.id,
|
|
|
- createDate: null,
|
|
|
- type:this.expenseMainTypeValue,
|
|
|
- ticketNum:1,remark:null,totalAmount:0,}
|
|
|
- this.invoiceList = []
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -1402,13 +1391,20 @@ export default {
|
|
|
// happenDate
|
|
|
this.addForm.items = JSON.stringify(this.invoiceList)//这里要传发票列表的json转string
|
|
|
this.addForm.totalAmount = this.totalCost
|
|
|
- this.http.post('/expense-sheet/add', this.addForm,
|
|
|
+ this.http.post('/expense-sheet/add', this.addForm,
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.$message({
|
|
|
message: this.$t('message.fillinsuccessfully'),
|
|
|
type: "success"
|
|
|
});
|
|
|
+ this.addForm = {
|
|
|
+ code:null,
|
|
|
+ ownerId:this.user.id,
|
|
|
+ createDate: null,
|
|
|
+ type:this.expenseMainTypeValue,
|
|
|
+ ticketNum:1,remark:null,totalAmount:0,}
|
|
|
+ this.invoiceList = []
|
|
|
this.getNextCode()
|
|
|
} else {
|
|
|
this.$message({
|