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

合同修改

parent c44cba2a
...@@ -3,36 +3,128 @@ ...@@ -3,36 +3,128 @@
<div class="query-box"> <div class="query-box">
<ul> <ul>
<li> <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>
<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 <input
type="button" type="button"
@click="" @click="goContract('onedayTripContract')"
class="normalBtn" class="normalBtn"
value="境内旅游合同" value="境内旅游合同"
/> />
<input <input
type="button" type="button"
@click="" @click="goContract('onedayTripContract')"
class="normalBtn" class="normalBtn"
value="单项委托合同" value="单项委托合同"
/> />
</li> </li>
</ul> </ul>
</div> </div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0"> <table
class="singeRowTable"
border="0"
cellspacing="0"
cellpadding="0"
v-loading="loading"
>
<tr> <tr>
<th width="300">编号</th> <th width="80">编号</th>
<th width="800">地址</th> <th width="120">合同编号</th>
<th width="100">城市</th> <th width="150">客户名称</th>
<th>操作</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>
<tr v-for="(item, index) in dataList"> <tr v-for="(item, index) in dataList" :key="index">
<td>{{ item.C_BusCode }}</td> <td>{{ item.ID }}</td>
<td>{{ item.C_BreakfastAddress }}</td> <td>{{ item.T_ContractNum }}</td>
<td>{{ item.C_ComplaintCity }}</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> <td>
<el-tooltip <el-tooltip
class="item" class="item"
...@@ -44,7 +136,7 @@ ...@@ -44,7 +136,7 @@
type="primary" type="primary"
icon="el-icon-edit" icon="el-icon-edit"
circle circle
@click="goContract('onedayTripContract', item)" @click="goContract('onedayTripContract', item.ID)"
></el-button> ></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip <el-tooltip
...@@ -63,6 +155,7 @@ ...@@ -63,6 +155,7 @@
</td> </td>
</tr> </tr>
</table> </table>
<el-pagination <el-pagination
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
...@@ -82,9 +175,32 @@ export default { ...@@ -82,9 +175,32 @@ export default {
total: 0, total: 0,
currentPage: 1, currentPage: 1,
dataList: [], dataList: [],
loading: false, //页面加载
msg: { msg: {
T_ContractNum: "", //合同编号
Tourists_Name: "", //客户名称
Tourists_Tel: "", //客户电话
StartDate: "", //开始日期
EndDate: "", //结束日期
Status: -1, //合同状态
pageIndex: 1, pageIndex: 1,
pageSize: 15 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 { ...@@ -94,25 +210,35 @@ export default {
methods: { methods: {
//删除合同 //删除合同
DeleteContract(item) { DeleteContract(item) {
this.apipost( var that = this;
this.Confirm("是否此合同删除?", function() {
var msg = {
ID: item.ID
};
that.apipost(
"travelcontract_post_RemoveTravelContractService", "travelcontract_post_RemoveTravelContractService",
{ ID: item.ID }, msg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.getList(); that.Success("删除成功!");
that.getList();
} else { } else {
this.Error(res.data.message); that.Error(res.data.message);
} }
}, },
err => {} null
); );
});
}, },
getList() { getList() {
this.loading = true;
//获取列表数据 //获取列表数据
this.apipost( this.apipost(
"travelcontract_get_GetPageListService", "travelcontract_get_GetPageListService",
this.msg, this.msg,
res => { res => {
this.loading = false;
console.log("res.data.data", res.data.data);
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
this.total = res.data.data.count; this.total = res.data.data.count;
...@@ -123,15 +249,23 @@ export default { ...@@ -123,15 +249,23 @@ export default {
err => {} err => {}
); );
}, },
resetPageIndex() {
this.msg.pageIndex = 1;
this.currentPage = 1;
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
goContract(path, item) { goContract(path, Id) {
var nId = 0;
if (Id && Id > 0) {
nId = Id;
}
this.$router.push({ this.$router.push({
name: path, name: path,
query: { query: {
id: item.ID, id: nId,
blank: "y", blank: "y",
tab: "一日游合同" 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