|
|
@@ -2,7 +2,7 @@
|
|
|
<el-dialog
|
|
|
:visible.sync="showDialog"
|
|
|
:title="title"
|
|
|
- width="90%"
|
|
|
+ width="95%"
|
|
|
:modal-append-to-body="true"
|
|
|
style="text-align:left;"
|
|
|
@close="closeDialog"
|
|
|
@@ -17,17 +17,9 @@
|
|
|
<el-form-item label="收款方:" prop="payee">
|
|
|
<el-input v-model="formModel.payee" placeholder="请输入收款方" class="input-form-main"></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="缴费单位:" prop="companyId">
|
|
|
- <el-select v-model="formModel.companyId" filterable class="input-form-main" @change="handChange">
|
|
|
- <el-option
|
|
|
- v-for="company in companyList"
|
|
|
- :key="company.id"
|
|
|
- :label="company.name"
|
|
|
- :value="company.id"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="收款账户:" prop="collectionAccountId">
|
|
|
+ <!-- <el-input v-model="formModel.collectionAccountId" style="display:none"></el-input>
|
|
|
+ <el-input v-model="formModel.collectionAccountName" placeholder="请输入收款方" class="input-form-main" readonly="readonly"></el-input> -->
|
|
|
<el-select v-model="formModel.collectionAccountId" class="input-form-main" >
|
|
|
<el-option
|
|
|
v-for="collectionAccount in collectionAccountList"
|
|
|
@@ -37,38 +29,87 @@
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="推送用户:" prop="personId" >
|
|
|
- <el-select v-model="formModel.personId" class="input-form-main" filterable>
|
|
|
+ <el-form-item label="缴费单位:" prop="checkinInfoId">
|
|
|
+ <el-select v-model="formModel.checkinInfoId" filterable class="input-form-main" @change="handleCompanyChange">
|
|
|
+ <el-option
|
|
|
+ v-for="checkinInfo in companyList"
|
|
|
+ :key="checkinInfo.id"
|
|
|
+ :label="checkinInfo.companyName"
|
|
|
+ :value="checkinInfo.id"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="推送用户:" prop="personName" >
|
|
|
+ <!--
|
|
|
+ <el-input v-model="formModel.personId" style="display:none"></el-input>
|
|
|
+ -->
|
|
|
+ <el-input v-model="formModel.personName" class="input-form-main"></el-input>
|
|
|
+ <!-- <el-select v-model="formModel.personId" class="input-form-main" filterable>
|
|
|
<el-option
|
|
|
v-for="person in personList"
|
|
|
:key="person.id"
|
|
|
:label="person.name"
|
|
|
:value="person.id"
|
|
|
></el-option>
|
|
|
- </el-select>
|
|
|
+ </el-select> -->
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注:" prop="bak">
|
|
|
<el-input type="textarea" v-model="formModel.bak" placeholder="请输入备注" class="input-form-main"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="开票类型:" prop="invoiceType">
|
|
|
+ <el-select v-model="formModel.invoiceType" filterable class="input-form-main">
|
|
|
+ <el-option
|
|
|
+ v-for="company in invoiceTypeList"
|
|
|
+ :key="company.value"
|
|
|
+ :label="company.name"
|
|
|
+ :value="company.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="微信支付:" prop="isOpenWechat" v-if="formModel.isMobilePayment">
|
|
|
+ <el-switch
|
|
|
+ v-model="formModel.isOpenWechat"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949"
|
|
|
+ @change="handlChange(row)">
|
|
|
+ </el-switch>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="支付宝支付:" prop="isOpenAlipay" v-if="formModel.isMobilePayment">
|
|
|
+ <el-switch
|
|
|
+ v-model="formModel.isOpenAlipay"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#ff4949"
|
|
|
+ @change="handlChange(row)">
|
|
|
+ </el-switch>
|
|
|
+ </el-form-item>
|
|
|
|
|
|
<h3>账单信息</h3>
|
|
|
- <el-table :data="formModel.billPushGoodsList" show-summary :summary-method="getSummaries">
|
|
|
- <el-table-column type="index" label="序号" width="50"></el-table-column>
|
|
|
- <el-table-column prop="goodsId" label="收费项目">
|
|
|
- <template slot-scope="{row}">
|
|
|
- <el-form-item>
|
|
|
- <el-select v-model="row.goodsId" placeholder="请选择" style="width:150px;">
|
|
|
+ <el-table
|
|
|
+ class="compact-table"
|
|
|
+ :data="formModel.billPushGoodsList"
|
|
|
+ show-summary :summary-method="getSummaries">
|
|
|
+ <el-table-column prop="sort" type="index" label="序号" width="50"></el-table-column>
|
|
|
+ <el-table-column prop="goodsId" label="收费项目" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-form-item
|
|
|
+ :prop="'billPushGoodsList.' + scope.$index + '.goodsId'"
|
|
|
+ :rules="ruleValidate['goodsId']"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.goodsId"
|
|
|
+ placeholder="请选择"
|
|
|
+ @change="handGoodsChange(scope)" size="mini">
|
|
|
<el-option
|
|
|
v-for="result in goodsList"
|
|
|
:key="result.id"
|
|
|
- :label="result.name"
|
|
|
+ :label="result.goodsName"
|
|
|
:value="result.id"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="beginEndTime" label="起止时间" width="400">
|
|
|
+ <el-table-column prop="beginEndTime" label="起止时间" width="380">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
|
:prop="'billPushGoodsList.' + scope.$index + '.beginEndTime'"
|
|
|
@@ -82,43 +123,55 @@
|
|
|
end-placeholder="结束时间"
|
|
|
placeholder="选择时间范围"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
+ size="mini"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="numStr" label="数量" width="120">
|
|
|
+ <el-table-column prop="numStr" label="数量" width="310">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
|
- :prop="'billPushGoodsList.' + scope.$index + '.numStr'"
|
|
|
- :rules="ruleValidate['numStr']"
|
|
|
+ :prop="'billPushGoodsList.' + scope.$index + '.numStr3'"
|
|
|
+ :rules="ruleValidate['numStr3']"
|
|
|
>
|
|
|
- <el-input placeholder="数量" v-model="scope.row.numStr"></el-input>
|
|
|
+ <template v-if="scope.row.goodTypeId=='7'">
|
|
|
+ <el-input style="width:85px" placeholder="止码" v-model.number="scope.row.numStr2" @change="handStartChange(scope)" size="mini"></el-input>
|
|
|
+ -<el-input style="width:85px" placeholder="起码" v-model.number="scope.row.numStr" @change="handStartChange(scope)" size="mini"></el-input>
|
|
|
+ =<el-input style="width:85px" v-model.number="scope.row.numStr3" @change="handNumChange(scope)" size="mini"></el-input>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-input placeholder="数量" v-model.number="scope.row.numStr3" @change="handNumChange(scope)" size="mini"></el-input>
|
|
|
+ </template>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="standard" label="收费标准">
|
|
|
+ <el-table-column prop="standard" label="收费标准" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
|
- :prop="'billPushGoodsList.' + scope.$index + '.standard'"
|
|
|
- :rules="ruleValidate['standard']"
|
|
|
+ :prop="'billPushGoodsList.' + scope.$index + '.unitPrice'"
|
|
|
+ :rules="ruleValidate['unitPrice']"
|
|
|
+ size="mini"
|
|
|
>
|
|
|
- <el-input placeholder="收费标准" v-model="scope.row.standard"></el-input>
|
|
|
+ <el-input placeholder="收费标准" v-model="scope.row.unitPrice" @change="handNumChange(scope)" size="mini">
|
|
|
+ <template slot="append">{{scope.row.unit}}</template>
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="totalFee" label="合计金额" width="150">
|
|
|
+ <el-table-column prop="totalFee" label="合计金额(元)">
|
|
|
<template slot-scope="scope">
|
|
|
<el-form-item
|
|
|
:prop="'billPushGoodsList.' + scope.$index + '.totalFee'"
|
|
|
- :rules="ruleValidate['totalFee']"
|
|
|
+ :rules="ruleValidate['totalFee']" size="mini"
|
|
|
>
|
|
|
- <el-input placeholder="合计金额" v-model="scope.row.totalFee"></el-input>
|
|
|
+ <el-input placeholder="合计金额" :value="scope.row.totalFee" readonly="readonly" size="mini">
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <el-table-column label="操作" width="200">
|
|
|
+ <el-table-column label="操作" width="100" fixed="right">
|
|
|
<template slot-scope="{row}">
|
|
|
<el-form-item>
|
|
|
<i class="el-icon-delete my-font" @click="handleDelete(row)"></i>
|
|
|
@@ -159,36 +212,51 @@ export default {
|
|
|
return {
|
|
|
ruleValidate: {
|
|
|
name: [{ required: true, message: "账单名称不能为空", trigger: "blur" }],
|
|
|
- payee: [{ required: true, message: "收款方不能为空", trigger: "blur" }],
|
|
|
- companyId: [{ required: true, message: "公司不能为空", trigger: "blur" }],
|
|
|
- collectionAccountId: [{ required: true, message: "请选择收款账户", trigger: "blur" }],
|
|
|
- payService: [{ required: true, message: "收费项目不能为空", trigger: "blur" }]
|
|
|
+ checkinInfoId: [{ required: true, message: "缴费单位不能为空", trigger: "blur" }],
|
|
|
+ // payService: [{ required: true, message: "收费项目不能为空", trigger: "blur" }],
|
|
|
+ invoiceType: [{ required: true, message: "开票类型不能为空", trigger: "blur" }],
|
|
|
+ personName: [{ required: true, message: "推送用户不能为空", trigger: "blur" }],
|
|
|
+ beginEndTime:[{ required: true, message: "起止时间不能为空", trigger: "blur" }],
|
|
|
+ numStr3:[{ required: true, message: "数量不能为空", trigger: "blur" }],
|
|
|
+ goodsId:[{ required: true, message: "收费项目未选择", trigger: "blur" }]
|
|
|
},
|
|
|
formModel: {
|
|
|
name:"",
|
|
|
payee:"",
|
|
|
companyId:"",
|
|
|
- payService:"",
|
|
|
+ // payService:"",
|
|
|
collectionAccountId:"",
|
|
|
+ collectionAccountName:"",
|
|
|
bak:"",
|
|
|
billPushGoodsList:[],
|
|
|
removeBillPushGoodsList:[],
|
|
|
-
|
|
|
+ personId:0,
|
|
|
+ personName:"",
|
|
|
+ checkinInfoId:"",
|
|
|
+ isOpenWechat:false,
|
|
|
+ isOpenAlipay:false,
|
|
|
},
|
|
|
- beginEndTime:"",
|
|
|
+ beginEndTime: null,
|
|
|
personList:[],
|
|
|
goodsList:[],
|
|
|
collectionAccountList:[],
|
|
|
payServiceList:[],
|
|
|
tableData:[],
|
|
|
companyList:[],
|
|
|
+ invoiceTypeList:[],
|
|
|
showDialog: true,
|
|
|
loading: false,
|
|
|
submitting: false,
|
|
|
+ props: {
|
|
|
+ // 配置项(必选)
|
|
|
+ value: "id",
|
|
|
+ label: "name",
|
|
|
+ children: "children"
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- companyInfoApi.list().then((response)=>{
|
|
|
+ companyPaymentApi.getCompanyList().then((response)=>{
|
|
|
var jsonData = response.data;
|
|
|
this.companyList = jsonData.data;
|
|
|
});
|
|
|
@@ -197,79 +265,103 @@ export default {
|
|
|
var jsonData = response.data;
|
|
|
this.collectionAccountList = jsonData.data;
|
|
|
});
|
|
|
+
|
|
|
+ billPushApi.invoiceTypeList().then((response)=>{
|
|
|
+ var jsonData = response.data;
|
|
|
+ this.invoiceTypeList = jsonData.data;
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
closeDialog() {
|
|
|
- this.$emit("close", false);
|
|
|
+ this.$emit("close", false);
|
|
|
},
|
|
|
- handChange(selVal){
|
|
|
+ handleCompanyChange(newVal){
|
|
|
+ // this.formModel.personName = newVal;
|
|
|
|
|
|
- this.formModel.payService = "";
|
|
|
+ var self = this;
|
|
|
|
|
|
var formData = new FormData();
|
|
|
- formData.append("companyId", selVal);
|
|
|
+ formData.append("checkinInfoId", newVal);
|
|
|
|
|
|
companyGoodsInfoApi.findByCompanyId(formData).then((response)=>{
|
|
|
var jsonData = response.data;
|
|
|
this.goodsList = jsonData.data;
|
|
|
});
|
|
|
|
|
|
- personInfoApi.findByCompanyId(formData).then((response)=>{
|
|
|
+ companyPaymentApi.findByCheckInId(formData).then((response)=>{
|
|
|
var jsonData = response.data;
|
|
|
- this.personList = jsonData.data;
|
|
|
+ this.formModel.personId = jsonData.data.id;
|
|
|
+ this.formModel.checkinInfoId = jsonData.data.checkinInfoId;
|
|
|
+
|
|
|
+ self.$set(self.formModel, 'personName', jsonData.data.name);
|
|
|
});
|
|
|
-
|
|
|
},
|
|
|
handleSubmit() {
|
|
|
var self = this;
|
|
|
|
|
|
- var billPushGoodsList = this.formModel.billPushGoodsList;
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ //增加转型,避免直接修改formModel
|
|
|
+ var requestData = JSON.parse(JSON.stringify(self.formModel));
|
|
|
|
|
|
- for(var i=0;i<billPushGoodsList.length;i++){
|
|
|
- billPushGoodsList[i].sortNo = i+1;
|
|
|
- billPushGoodsList[i].beginDate = billPushGoodsList[i].beginEndTime[0];
|
|
|
- billPushGoodsList[i].endDate = billPushGoodsList[i].beginEndTime[1]
|
|
|
- billPushGoodsList[i].beginEndTime="";
|
|
|
- }
|
|
|
+ var billPushGoodsList = requestData.billPushGoodsList;
|
|
|
|
|
|
- var removeBillPushGoodsList = this.formModel.removeBillPushGoodsList;
|
|
|
+ if(billPushGoodsList.length==0) {
|
|
|
+ this.$message.warning("收费项目不能为空!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- for(var j=0;j<removeBillPushGoodsList.length;j++){
|
|
|
- removeBillPushGoodsList[j].sortNo = j+1;
|
|
|
- removeBillPushGoodsList[j].beginDate = removeBillPushGoodsList[j].beginEndTime[0];
|
|
|
- removeBillPushGoodsList[j].endDate = removeBillPushGoodsList[j].beginEndTime[1]
|
|
|
- removeBillPushGoodsList[j].beginEndTime="";
|
|
|
- }
|
|
|
+ for(var i=0;i<billPushGoodsList.length;i++){
|
|
|
+ billPushGoodsList[i].sortNo = i+1;
|
|
|
|
|
|
- this.$refs["form"].validate(valid => {
|
|
|
- if (valid) {
|
|
|
- (function() {
|
|
|
- var id = self.formModel.id;
|
|
|
-
|
|
|
-
|
|
|
- if (id == null || id.length == 0) {
|
|
|
- return billPushApi.add(self.formModel);
|
|
|
- } else {
|
|
|
- return billPushApi.update(self.formModel);
|
|
|
+ if(billPushGoodsList[i].beginEndTime!=null){
|
|
|
+ billPushGoodsList[i].beginDate = billPushGoodsList[i].beginEndTime[0];
|
|
|
+ billPushGoodsList[i].endDate = billPushGoodsList[i].beginEndTime[1]
|
|
|
+ billPushGoodsList[i].beginEndTime=null;
|
|
|
+ }
|
|
|
+
|
|
|
+ billPushGoodsList[i].standard = billPushGoodsList[i].unitPrice + billPushGoodsList[i].unit;
|
|
|
}
|
|
|
- })().then(function(response) {
|
|
|
- var jsonData = response.data;
|
|
|
|
|
|
- if (jsonData.result) {
|
|
|
- self.$message({
|
|
|
- message: "保存成功!",
|
|
|
- type: "success"
|
|
|
- });
|
|
|
+ var removeBillPushGoodsList = requestData.removeBillPushGoodsList;
|
|
|
|
|
|
- self.$emit("close", true);
|
|
|
- } else {
|
|
|
- self.$message({
|
|
|
- message: jsonData.message + "",
|
|
|
- type: "warning"
|
|
|
- });
|
|
|
- self.$emit("close", false);
|
|
|
+ for(var j=0;j<removeBillPushGoodsList.length;j++){
|
|
|
+ removeBillPushGoodsList[j].sortNo = j+1;
|
|
|
+
|
|
|
+ if(removeBillPushGoodsList[j].beginEndTime!=null){
|
|
|
+ removeBillPushGoodsList[j].beginDate = removeBillPushGoodsList[j].beginEndTime[0];
|
|
|
+ removeBillPushGoodsList[j].endDate = removeBillPushGoodsList[j].beginEndTime[1];
|
|
|
+ removeBillPushGoodsList[j].beginEndTime=null;
|
|
|
+ }
|
|
|
}
|
|
|
- });
|
|
|
+
|
|
|
+ (function() {
|
|
|
+ var id = requestData.id;
|
|
|
+
|
|
|
+ if (id == null || id.length == 0) {
|
|
|
+ return billPushApi.add(requestData);
|
|
|
+ } else {
|
|
|
+ return billPushApi.update(requestData);
|
|
|
+ }
|
|
|
+ })().then(function(response) {
|
|
|
+ var jsonData = response.data;
|
|
|
+
|
|
|
+ if (jsonData.result) {
|
|
|
+ self.$message({
|
|
|
+ message: "保存成功!",
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+
|
|
|
+ self.$emit("close", true);
|
|
|
+ } else {
|
|
|
+ self.$message({
|
|
|
+ message: jsonData.message + "",
|
|
|
+ type: "warning"
|
|
|
+ });
|
|
|
+
|
|
|
+ self.$emit("close", false);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -277,9 +369,13 @@ export default {
|
|
|
this.formModel.billPushGoodsList.push({
|
|
|
sortNo: this.formModel.billPushGoodsList.length + 1,
|
|
|
goodsId: "",
|
|
|
- beginEndTime: "",
|
|
|
+ beginEndTime: null,
|
|
|
numStr: "",
|
|
|
+ numStr2: "",
|
|
|
+ numStr3: "",
|
|
|
totalFee: "",
|
|
|
+ standard: "",
|
|
|
+ unit: ""
|
|
|
});
|
|
|
},
|
|
|
handleInsert(row) {
|
|
|
@@ -289,10 +385,14 @@ export default {
|
|
|
if(index>=0){
|
|
|
billPushGoodsList.splice(index+1,0,{
|
|
|
sortNo: index + 2,
|
|
|
- name: "",
|
|
|
- beginEndTime: "",
|
|
|
+ goodsId: "",
|
|
|
+ beginEndTime: null,
|
|
|
numStr: "",
|
|
|
+ numStr2: "",
|
|
|
+ numStr3: "",
|
|
|
totalFee: "",
|
|
|
+ standard: "",
|
|
|
+ unit: ""
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
@@ -306,28 +406,102 @@ export default {
|
|
|
getSummaries(param) {
|
|
|
const { columns, data } = param;
|
|
|
const sums = [];
|
|
|
+
|
|
|
columns.forEach((column, index) => {
|
|
|
if (index === 0) {
|
|
|
sums[index] = '合计';
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
const values = data.map(item => Number(item[column.property]));
|
|
|
+
|
|
|
if (!values.every(value => isNaN(value))) {
|
|
|
sums[5] = values.reduce((prev, curr) => {
|
|
|
- const value = Number(curr);
|
|
|
- if (!isNaN(value)) {
|
|
|
- return prev + curr;
|
|
|
- } else {
|
|
|
- return prev;
|
|
|
- }
|
|
|
+ const value = Number(curr);
|
|
|
+ if (!isNaN(value)) {
|
|
|
+ return prev + curr;
|
|
|
+ } else {
|
|
|
+ return prev;
|
|
|
+ }
|
|
|
}, 0);
|
|
|
- sums[5] ;
|
|
|
+
|
|
|
+ sums[5] = this.fmtMoney(sums[5]);
|
|
|
} else {
|
|
|
sums[index] = '';
|
|
|
}
|
|
|
});
|
|
|
|
|
|
return sums;
|
|
|
+ },
|
|
|
+ fmtMoney(value){
|
|
|
+ const num = Number(value);
|
|
|
+
|
|
|
+ if (!isNaN(num)) {
|
|
|
+ return num.toFixed(2);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ return num;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handGoodsChange(scope){
|
|
|
+ var row = scope.row;
|
|
|
+
|
|
|
+ // setTimeout(()=>{
|
|
|
+ var formData = new FormData();
|
|
|
+ formData.append("id", row.goodsId);
|
|
|
+ formData.append("companyId", this.formModel.companyId);
|
|
|
+
|
|
|
+ companyPaymentApi.loadDetails(formData).then((response)=>{
|
|
|
+ var jsonData = response.data;
|
|
|
+
|
|
|
+ if(jsonData.result){
|
|
|
+ var data = jsonData.data;
|
|
|
+
|
|
|
+ // row.standard = data.unitPriceStr;
|
|
|
+ // row.unit = data.unitPrice;
|
|
|
+ // row.goodTypeId = data.goodType;
|
|
|
+ this.$set(row,"standard",data.unitPriceStr);
|
|
|
+ this.$set(row,"unit",data.unit);
|
|
|
+ this.$set(row,"unitPrice",data.unitPrice);
|
|
|
+ this.$set(row,"goodTypeId",data.goodType);
|
|
|
+
|
|
|
+ //如果是电费会返回起码
|
|
|
+ this.$set(row,"numStr", data.numStr);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // },100);
|
|
|
+ },
|
|
|
+ handNumChange(scope){
|
|
|
+ var row = scope.row;
|
|
|
+
|
|
|
+ var num = row.numStr3;
|
|
|
+ var unitPrice = row.unitPrice;
|
|
|
+ var totalFee = num*1*unitPrice*1;
|
|
|
+
|
|
|
+ if(totalFee!=null){
|
|
|
+ this.formModel.billPushGoodsList[scope.$index].totalFee = totalFee.toFixed(2);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handStartChange(scope){
|
|
|
+ var row = scope.row;
|
|
|
+
|
|
|
+ var num1=row.numStr;
|
|
|
+ var num2=row.numStr2;
|
|
|
+ var unitPrice = row.unitPrice;
|
|
|
+
|
|
|
+ setTimeout(()=>{
|
|
|
+ if(num1!=null&&num2!=null){
|
|
|
+ var num3 = num2-num1;
|
|
|
+
|
|
|
+ this.formModel.billPushGoodsList[scope.$index].numStr3 = num3;
|
|
|
+
|
|
|
+ var totalFee = num3*1*unitPrice*1;
|
|
|
+
|
|
|
+ if(totalFee!=null){
|
|
|
+ this.formModel.billPushGoodsList[scope.$index].totalFee = totalFee.toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },100);
|
|
|
}
|
|
|
},
|
|
|
mounted: function() {
|
|
|
@@ -357,8 +531,8 @@ export default {
|
|
|
billPushGoodsList[i].beginEndTime = beginEndTime;
|
|
|
}
|
|
|
|
|
|
- if(jsonData.data.companyId!=null&&jsonData.data!=""){
|
|
|
- this.handChange(jsonData.data.companyId);
|
|
|
+ if(jsonData.data.checkinInfoId!=null&&jsonData.data!=""){
|
|
|
+ this.handleCompanyChange(jsonData.data.checkinInfoId);
|
|
|
}
|
|
|
} else {
|
|
|
self.$message.error(jsonData.message + "");
|
|
|
@@ -370,16 +544,28 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
-<style>
|
|
|
+<style rel="stylesheet/scss" lang="scss" scoped>
|
|
|
.input-form-main{
|
|
|
- width: 500px;
|
|
|
+ width: 300px;
|
|
|
}
|
|
|
.link-span{
|
|
|
margin-right: 20px;
|
|
|
}
|
|
|
+.el-form-item{
|
|
|
+ margin-bottom: 25px;
|
|
|
+}
|
|
|
.my-font {
|
|
|
font-size: 20px;
|
|
|
cursor: pointer;
|
|
|
margin-right: 10px;
|
|
|
}
|
|
|
+.user-panel {
|
|
|
+ margin: 10px auto;
|
|
|
+}
|
|
|
+
|
|
|
+.compact-table{
|
|
|
+ .el-form-item {
|
|
|
+ margin-bottom: 5px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|