Commit 44f2f5fa authored by 黄奎's avatar 黄奎

合同修改

parent c44cba2a
......@@ -3,36 +3,128 @@
<div class="query-box">
<ul>
<li>
<span> </span>
<span
><em>合同编号</em
><el-input
class="w210"
v-model="msg.T_ContractNum"
placeholder="请输入合同编号"
@keyup.enter.native="getList"
></el-input
></span>
</li>
<li>
<input type="button" @click="" class="normalBtn" value="一日游合同" />
<span
><em>客户名称</em
><el-input
class="w210"
v-model="msg.Tourists_Name"
placeholder="请输入客户名称"
@keyup.enter.native="getList"
></el-input
></span>
</li>
<li>
<span
><em>客户电话</em
><el-input
class="w210"
v-model="msg.Tourists_Tel"
placeholder="请输入客户电话"
@keyup.enter.native="getList"
></el-input
></span>
</li>
<li>
<span
><em>{{ $t("sm.Date") }}</em>
<el-date-picker
v-model="msg.StartDate"
class="w135"
value-format="yyyy-MM-dd"
type="date"
:picker-options="pickerBeginDateBefore"
></el-date-picker>
-
<el-date-picker
v-model="msg.EndDate"
class="w135"
value-format="yyyy-MM-dd"
type="date"
:picker-options="pickerBeginDateAfter"
></el-date-picker>
</span>
</li>
<li>
<span
><em>合同状态</em>
<el-select v-model="msg.Status" :placeholder="$t('pub.pleaseSel')">
<el-option label="请选择" :value="-1" :key="-1"> </el-option>
<el-option label="正常" :value="0" :key="0"> </el-option>
<el-option label="删除" :value="1" :key="1"> </el-option>
</el-select>
</span>
</li>
<li>
<input
type="button"
class="normalBtn"
:value="$t('pub.searchBtn')"
@click="
getList();
resetPageIndex();
"
/>
</li>
<li>
<input
type="button"
@click="goContract('onedayTripContract')"
class="normalBtn"
value="一日游合同"
/>
<input
type="button"
@click=""
@click="goContract('onedayTripContract')"
class="normalBtn"
value="境内旅游合同"
/>
<input
type="button"
@click=""
@click="goContract('onedayTripContract')"
class="normalBtn"
value="单项委托合同"
/>
</li>
</ul>
</div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
<table
class="singeRowTable"
border="0"
cellspacing="0"
cellpadding="0"
v-loading="loading"
>
<tr>
<th width="300">编号</th>
<th width="800">地址</th>
<th width="100">城市</th>
<th>操作</th>
<th width="80">编号</th>
<th width="120">合同编号</th>
<th width="150">客户名称</th>
<th width="150">客户联系电话</th>
<th width="150">客户地址</th>
<th width="150">合同状态</th>
<th width="100">创建人</th>
<th width="120">创建时间</th>
<th width="130">操作</th>
</tr>
<tr v-for="(item, index) in dataList">
<td>{{ item.C_BusCode }}</td>
<td>{{ item.C_BreakfastAddress }}</td>
<td>{{ item.C_ComplaintCity }}</td>
<tr v-for="(item, index) in dataList" :key="index">
<td>{{ item.ID }}</td>
<td>{{ item.T_ContractNum }}</td>
<td>{{ item.Tourists_Name }}</td>
<td>{{ item.Tourists_Tel }}</td>
<td>{{ item.Tourists_Addres }}</td>
<td>{{ item.StatusStr }}</td>
<td>{{ item.CreateByName }}</td>
<td>{{ item.CreateTimeStr }}</td>
<td>
<el-tooltip
class="item"
......@@ -44,7 +136,7 @@
type="primary"
icon="el-icon-edit"
circle
@click="goContract('onedayTripContract', item)"
@click="goContract('onedayTripContract', item.ID)"
></el-button>
</el-tooltip>
<el-tooltip
......@@ -63,6 +155,7 @@
</td>
</tr>
</table>
<el-pagination
background
@current-change="handleCurrentChange"
......@@ -82,9 +175,32 @@ export default {
total: 0,
currentPage: 1,
dataList: [],
loading: false, //页面加载
msg: {
T_ContractNum: "", //合同编号
Tourists_Name: "", //客户名称
Tourists_Tel: "", //客户电话
StartDate: "", //开始日期
EndDate: "", //结束日期
Status: -1, //合同状态
pageIndex: 1,
pageSize: 15
},
pickerBeginDateBefore: {
disabledDate: time => {
if (this.msg.EndDate == null) {
return false;
} else {
let endTime = new Date(this.msg.EndDate);
return endTime.getTime() < time.getTime();
}
}
},
pickerBeginDateAfter: {
disabledDate: time => {
let startTime = new Date(this.msg.StartDate);
return startTime.getTime() >= time.getTime();
}
}
};
},
......@@ -94,25 +210,35 @@ export default {
methods: {
//删除合同
DeleteContract(item) {
this.apipost(
"travelcontract_post_RemoveTravelContractService",
{ ID: item.ID },
res => {
if (res.data.resultCode == 1) {
this.getList();
} else {
this.Error(res.data.message);
}
},
err => {}
);
var that = this;
this.Confirm("是否此合同删除?", function() {
var msg = {
ID: item.ID
};
that.apipost(
"travelcontract_post_RemoveTravelContractService",
msg,
res => {
if (res.data.resultCode == 1) {
that.Success("删除成功!");
that.getList();
} else {
that.Error(res.data.message);
}
},
null
);
});
},
getList() {
this.loading = true;
//获取列表数据
this.apipost(
"travelcontract_get_GetPageListService",
this.msg,
res => {
this.loading = false;
console.log("res.data.data", res.data.data);
if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData;
this.total = res.data.data.count;
......@@ -123,15 +249,23 @@ export default {
err => {}
);
},
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
},
handleCurrentChange(val) {
this.msg.pageIndex = val;
this.getList();
},
goContract(path, item) {
goContract(path, Id) {
var nId = 0;
if (Id && Id > 0) {
nId = Id;
}
this.$router.push({
name: path,
query: {
id: item.ID,
id: nId,
blank: "y",
tab: "一日游合同"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment