checkIn.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. <template>
  2. <div>
  3. <el-row class="handle-box" style="margin-bottom: 10px">
  4. <el-col :span="8">
  5. <div class="Pageform">
  6. <div class="formlabel">买受人</div>
  7. <div class="formvalue">
  8. <el-input v-model="search.buyerName" class="ch-input ch-input-size" placeholder="买受人" size="small" @keyup.enter.native="handleSearch()" />
  9. </div>
  10. </div>
  11. </el-col>
  12. <el-col :span="8">
  13. <div class="Pageform">
  14. <div class="formlabel">房屋</div>
  15. <div class="formvalue">
  16. <el-input v-model="search.houseName" class="ch-input ch-input-size" placeholder="房号" size="small" @keyup.enter.native="handleSearch()" />
  17. </div>
  18. </div>
  19. </el-col>
  20. <el-col :span="8">
  21. <div class="Pageform">
  22. <div class="formlabel">身份证</div>
  23. <div class="formvalue">
  24. <el-input v-model="search.buyerIdentityCard" class="ch-input ch-input-size" placeholder="身份证" size="small" @keyup.enter.native="handleSearch()" />
  25. </div>
  26. </div>
  27. </el-col>
  28. <el-col :span="8">
  29. <div class="Pageform">
  30. <div class="formlabel">批次号</div>
  31. <div class="formvalue">
  32. <el-input v-model="search.batchNumber" class="ch-input ch-input-size" placeholder="批次号" size="small" @keyup.enter.native="handleSearch()" />
  33. </div>
  34. </div>
  35. </el-col>
  36. </el-row>
  37. <el-row class="handle-box" style="margin-bottom: 10px">
  38. <el-col :span="24">
  39. <el-button class="ch-button-warning" size="small" style="float: right" @click="handleReset()"><i class="el-icon-search" />&nbsp;重置</el-button>
  40. <el-button class="ch-button" size="small" style="float: right" @click="handleSearch()"><i class="el-icon-search" />&nbsp;查询</el-button>
  41. </el-col>
  42. </el-row>
  43. <el-row class="handle-box">
  44. <el-col :span="24">
  45. <el-table v-loading="loading" :data="AllData" row-class-name="g_table_row" stripe>
  46. <el-table-column label="序号" type="index" width="60" />
  47. <el-table-column label="合同编号" width="280">
  48. <template scope="scope">
  49. <el-link :underline="false" type="primary" @click="handleView2(scope.row)">{{ scope.row.contractNumber }}</el-link>
  50. </template>
  51. </el-table-column>
  52. <!-- <el-table-column label="网签备案号" prop="recordNumber" />-->
  53. <el-table-column label="买受人" prop="buyerName" />
  54. <el-table-column label="房屋" prop="houseName" width="280" />
  55. <el-table-column label="入住状态" prop="statusString" />
  56. <!-- <el-table-column label="备注" prop="remark" />-->
  57. <el-table-column label="备注" prop="remark">
  58. <template scope="scope">
  59. <el-tooltip placement="bottom" effect="light">
  60. <template slot="content">
  61. <p style="max-width:900px;">{{ scope.row.remark }}</p>
  62. </template>
  63. <div class="zt_css">{{ scope.row.remark }}</div>
  64. </el-tooltip>
  65. </template>
  66. </el-table-column>
  67. <el-table-column label="入住日期" prop="inDate" width="150" />
  68. <el-table-column label="经办人" prop="operater" width="100" />
  69. <!-- <el-table-column label="实测建筑面积(㎡)" prop="actualBuildArea" width="110" />-->
  70. <!-- <el-table-column label="买卖单价(㎡)" prop="housePrice" />-->
  71. <!-- <el-table-column label="买受人产权份额占比" prop="buyerProportion" />-->
  72. <!-- <el-table-column label="付款方式" prop="paymentMethod" />-->
  73. <!-- <el-table-column label="应收房款(元)" prop="totalPrice" />-->
  74. <!-- <el-table-column label="应收专项维修资金(元)" prop="maintenanceFunds" />-->
  75. <!-- <el-table-column label="合同状态" prop="contractStatusStr" width="110">-->
  76. <!-- <template scope="scope">-->
  77. <!-- <span-->
  78. <!-- :style="{'color':scope.row.contractStatusStr==='已退房'?'red':scope.row.contractStatusStr==='已签约'?'green':'gray'}"-->
  79. <!-- >-->
  80. <!-- {{ scope.row.contractStatusStr }}-->
  81. <!-- </span>-->
  82. <!-- </template>-->
  83. <!-- </el-table-column>-->
  84. <!-- <el-table-column label="签约日期" prop="signingDate" />-->
  85. <el-table-column header-align="center" label="操作" width="180">
  86. <template scope="scope">
  87. <el-button size="mini" type="text" @click="handleEdit(scope.row)">状态登记</el-button>
  88. <el-button size="mini" type="text" @click="handleView(scope.row)">查看</el-button>
  89. </template>
  90. </el-table-column>
  91. </el-table>
  92. <div class="table-page">
  93. <el-pagination
  94. :current-page.sync="currentPage"
  95. :page-sizes="[10, 20, 50, 100]"
  96. :page-size="pageSize"
  97. background
  98. layout="total, sizes, prev, pager, next, jumper"
  99. :total="allpage"
  100. @size-change="handleSizeChange"
  101. @current-change="handleCurrentChange"
  102. />
  103. </div>
  104. </el-col>
  105. </el-row>
  106. <!--合同签约/修改-->
  107. <el-dialog
  108. :visible.sync="dialogVisible2"
  109. :close-on-click-modal="false"
  110. :close-on-press-escape="false"
  111. :title="dialogTitle2"
  112. width="90%"
  113. top="20px"
  114. class="statistic_base"
  115. :append-to-body="true"
  116. :modal-append-to-body="true"
  117. custom-class="tagdialog"
  118. >
  119. <contract-add v-if="dialogVisible2" ref="contractAdd" @cancel="cancel" />
  120. </el-dialog>
  121. <el-dialog
  122. :visible.sync="dialogVisible"
  123. :close-on-click-modal="false"
  124. :close-on-press-escape="false"
  125. :title="dialogTitle"
  126. width="60%"
  127. top="70px"
  128. class="statistic_base"
  129. :append-to-body="true"
  130. :modal-append-to-body="true"
  131. custom-class="tagdialog"
  132. >
  133. <el-form ref="form" :model="form" :rules="rules" style="width: 100%;padding: 5px">
  134. <el-row>
  135. <el-col style="padding-bottom: 0px">
  136. <el-card shadow="always" style="padding: 15px 5px 5px 15px">
  137. <el-row>
  138. <el-col :span="3" class="col-txt"><span>入住状态</span></el-col>
  139. <el-col :span="8" class="col-input">
  140. <el-form-item>
  141. <el-select
  142. v-model="form.status"
  143. :disabled="dialogTitle=='查看'"
  144. clearable
  145. filterable
  146. placeholder="入住状态"
  147. style="width: 100%"
  148. >
  149. <el-option
  150. v-for="item in dc_data.RU_ZHU_STATUS"
  151. :key="item.value"
  152. :label="item.label"
  153. :value="item.value"
  154. />
  155. </el-select>
  156. </el-form-item>
  157. </el-col>
  158. <div v-if="form.status==1">
  159. <el-col :span="4" class="col-txt"><span>入住日期</span></el-col>
  160. <el-col :span="8" class="col-input">
  161. <el-form-item>
  162. <el-date-picker
  163. v-model="form.inDate"
  164. popper-class="statistic_base"
  165. :disabled="dialogTitle=='查看'"
  166. placeholder="入住日期"
  167. style="width: 100%"
  168. type="date"
  169. value-format="yyyy-MM-dd HH:mm:ss"
  170. />
  171. </el-form-item>
  172. </el-col>
  173. </div>
  174. </el-row>
  175. <el-row>
  176. <el-col :span="3" class="col-txt"><span>备注</span></el-col>
  177. <el-col :span="20" class="col-input">
  178. <el-form-item>
  179. <el-input
  180. v-model="form.remark"
  181. autosize
  182. :readonly="dialogTitle=='查看'"
  183. :rows="4"
  184. type="textarea"
  185. maxlength="2000"
  186. show-word-limit
  187. />
  188. </el-form-item>
  189. </el-col>
  190. </el-row>
  191. <el-row style="margin-top: 50px">
  192. <el-col :span="3" class="col-txt"><span>经办时间:</span></el-col>
  193. <el-col :span="20" class="col-input">
  194. <span>{{ form.operateTime }}</span>
  195. </el-col>
  196. </el-row>
  197. <el-row>
  198. <el-col :span="3" class="col-txt"><span>经办人:</span></el-col>
  199. <el-col :span="20" class="col-input">
  200. <span>{{ form.operater }}</span>
  201. </el-col>
  202. </el-row>
  203. </el-card>
  204. </el-col>
  205. </el-row>
  206. </el-form>
  207. <div slot="footer">
  208. <el-button @click="dialogVisible = false">取 消</el-button>
  209. <el-button v-if="dialogTitle!='查看'" type="primary" :loading="loadingFlag" @click="confirmSubmit()">确 定</el-button>
  210. </div>
  211. </el-dialog>
  212. </div>
  213. </template>
  214. <script>
  215. import Base from '@/views/base/base'
  216. import BaseData from '@/views/base/baseData'
  217. import contractAdd from '@/views/signingManagement/contractManagement/contractAdd.vue'
  218. export default {
  219. name: 'CheckIn',
  220. components: { contractAdd },
  221. mixins: [Base, BaseData],
  222. data() {
  223. return {
  224. dc_key: ['RU_ZHU_STATUS'],
  225. // 列表相关
  226. search: {
  227. },
  228. AllData: [],
  229. loading: false,
  230. // 弹框相关
  231. dialogVisible: false,
  232. rules: {},
  233. form: {},
  234. dialogTitle: '新增',
  235. dialogVisible2: false,
  236. dialogTitle2: '查看',
  237. loadingFlag: false
  238. }
  239. },
  240. mounted() {
  241. this.initDict(this.dc_key).then((res) => {
  242. this.getData()
  243. })
  244. },
  245. methods: {
  246. getData: function() {
  247. const _this = this
  248. _this.loading = true
  249. _this.AllData = []
  250. this.search.pageNum = this.currentPage
  251. this.search.pageSize = this.pageSize
  252. this.baseRequest('list', this.search).then((res) => {
  253. if (res.data.rows) {
  254. res.data.rows.forEach(function(item) {
  255. const json = _this.getItemJson(item)
  256. _this.AllData.push(json)
  257. })
  258. _this.allpage = res.data.total
  259. }
  260. _this.loading = false
  261. }).catch((e) => {
  262. // console.log(e)
  263. })
  264. // this.initOutData()
  265. },
  266. handleSearch: function() {
  267. this.getData()
  268. },
  269. handleReset: function() {
  270. for (const i in this.search) {
  271. if (i !== 'pageNum' && i !== 'pageSize') {
  272. this.search[i] = ''
  273. }
  274. }
  275. this.handleSearch()
  276. },
  277. getItemJson: function(item) {
  278. if (!item.status) {
  279. item.status = 'null'
  280. }
  281. if (item.contractManageId2) {
  282. item.contractManageId = item.contractManageId2
  283. }
  284. item.statusString = this.dc_map.RU_ZHU_STATUS[item.status]
  285. item.operateTime = this.$common.transDate(item.operateTime, this.$constant.DATE_PATTERN.DATE_TIME_h)
  286. item.inDate = this.$common.transDate(item.inDate, this.$constant.DATE_PATTERN.DATE_TIME_h)
  287. return item
  288. },
  289. /* 合同编辑*/
  290. // handleEdit: function(val) {
  291. // this.dialogVisible = true
  292. // this.dialogTitle = '签约'
  293. // val.isView = false
  294. // // 新vue时调用的方法
  295. // this.$nextTick(() => {
  296. // this.$refs.contractAdd.initData(val)
  297. // })
  298. // },
  299. /* 合同查看*/
  300. handleView2(val) {
  301. this.dialogVisible2 = true
  302. this.dialogTitle2 = '查看'
  303. val.isView = true
  304. val.id = val.contractManageId2
  305. // 新vue时调用的方法
  306. // console.log('val.isView',val.isView)
  307. this.$nextTick(() => {
  308. // console.log('val.isView',val.isView)
  309. this.$refs.contractAdd.initData(val)
  310. })
  311. },
  312. cancel: function() {
  313. this.dialogVisible2 = false
  314. },
  315. /* 编辑*/
  316. handleEdit: function(val) {
  317. this.form = Object.assign({}, val)
  318. this.dialogVisible = true
  319. this.dialogTitle = '状态登记'
  320. this.loadingFlag = false
  321. },
  322. handleView(val) {
  323. this.dialogVisible = true
  324. this.dialogTitle = '查看'
  325. this.form = Object.assign({}, val)
  326. },
  327. confirmSubmit: function() {
  328. const _this = this
  329. _this.loadingFlag = true
  330. this.$refs.form.validate(valid => {
  331. if (valid) {
  332. let soaUrl = 'edit'
  333. const extraData = {}
  334. const postData = Object.assign({}, _this.form, extraData)
  335. if (!this.form.id) {
  336. soaUrl = 'add'
  337. }
  338. this.opRecord(postData, soaUrl)
  339. } else {
  340. // console.log('error submit!!')
  341. return false
  342. }
  343. })
  344. },
  345. baseRequest(opUrl, postData) {
  346. return this.$channel.globeRequest('CheckInController', opUrl, postData, 'project')
  347. }
  348. }
  349. }
  350. </script>
  351. <style lang="scss">
  352. .Pageform{
  353. display: flex;
  354. align-items: center;
  355. .formlabel{
  356. width: 15%;
  357. text-align: right;
  358. font-size:14px ;
  359. }
  360. .formvalue{
  361. width: 75%;
  362. display: flex;
  363. margin-left: 2%;
  364. .ch-input{
  365. width: 100%;
  366. }
  367. .zhi{
  368. width: 60px;
  369. text-align: center;
  370. }
  371. }
  372. }
  373. </style>
  374. <style scoped>
  375. .zt_css{
  376. overflow: hidden;
  377. white-space: nowrap;
  378. text-overflow:ellipsis;
  379. }
  380. .ch-input .el-input__inner {
  381. border-color: #32323A;
  382. }
  383. .ch-input-size {
  384. width: 150px;
  385. }
  386. .ch-button {
  387. border-color: #32323A;
  388. background-color: #32323A;
  389. color: #fff;
  390. }
  391. .ch-button-warning {
  392. margin-left: 10px;
  393. border-color: #E6A23C;
  394. background-color: #E6A23C;
  395. color: #fff;
  396. }
  397. .ch-button-export {
  398. margin-left: 10px;
  399. border-color: #98CC1F;
  400. background-color: #98CC1F;
  401. color: #fff;
  402. }
  403. /deep/.el-dialog__header {
  404. padding: 10px 20px;
  405. }
  406. /deep/.el-dialog__body {
  407. padding: 10px 20px;
  408. }
  409. </style>