123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759 |
- <!--司机管理-->
- <template>
- <div>
- <BaseHeaderLayout :leftSpan="12">
- <template slot="left">
- <ws-button type="primary" @click="handleAdd()"><img
- width="13"
- height="13"
- style="
- vertical-align: text-top;
- position: relative;
- top: 2px;
- left: -4px;
- "
- src="../../../public/img/header-add.png"
- alt=""
- />添加</ws-button>
- </template>
- <template slot="right">
- <span style="display: inline-block; width: 65px; color: #8890b1"
- >城市:</span
- >
- <el-cascader
- :options="options_"
- v-model="searchTypeText"
- clearable
- size="large"
- placeholder="请选择所在城市"
- style="width: 30%"
- @change="selecttaskType"
- />
- <ws-input
- v-model="searchKeyWord"
- placeholder="可按司机姓名、手机号、车牌号、身份证号查找"
- clearable
- maxlength="200"
- type="input"
- class="findValue"
- ></ws-input>
- <ws-button type="primary" @click="handleLook()">
- <img
- width="14"
- height="16"
- style="
- vertical-align: text-top;
- position: relative;
- top: 0px;
- left: -8px;
- "
- src="../../../public/img/sousuo.png"
- alt=""
- />
- </ws-button>
- </template>
- </BaseHeaderLayout>
- <div>
- <el-table
- class="wenzi"
- :data="driverList.records"
- style="width: 100%; margin-top: 20px"
- fit
- ref="expandstable"
- :expand-row-keys="expands"
- :row-key="getRowKeys"
- height="780"
- >
- <el-table-column type="expand">
- <template slot-scope="props">
- <ws-form>
- <div v-for="item in props.row.driverPayeeInfoList">
- <ws-info-table>
- <ws-form-item
- :class="item.accountTypeFlag == 1 ? 'personage' : 'company'"
- v-if="item.accountTypeFlag == 1"
- label="收款人"
- span="1"
- prop="payeeName"
- class="el-car name"
- >
- <div style="width: 100%">{{ item.payeeName }}</div>
- </ws-form-item>
- <ws-form-item
- :class="item.accountTypeFlag == 1 ? 'personage' : 'company'"
- v-if="item.accountTypeFlag == 2"
- label="企业名称"
- span="1"
- prop="compName"
- class="el-car"
- >
- <div style="width: 100%">{{ item.compName }}</div>
- </ws-form-item>
- <ws-form-item
- :class="item.accountTypeFlag == 1 ? 'personage' : 'company'"
- v-if="item.accountTypeFlag == 1"
- label="身份证"
- span="1"
- prop="payeeNumberCard"
- class="el-car card"
- >
- <div style="width: 100%">
- {{ item.payeeNumberCard }}
- <img
- width="12"
- height="13"
- src="../../../public/img/fujian-grey.png"
- alt=""
- @click="fujian1(item)"
- />
- </div>
- </ws-form-item>
- <ws-form-item
- :class="item.accountTypeFlag == 1 ? 'personage' : 'company'"
- label="开户行"
- span="1"
- prop="bankDeposit"
- class="el-car"
- >
- <span
- style="
- margin: 10px;
- display: inline-block;
- border-right: 1px solid #e9ecf7;
- padding-right: 10px;
- "
- >{{ item.bankDeposit }}</span
- ><span
- style="
- margin: 10px;
- padding: 0px;
- display: inline-block;
- word-wrap: break-word;
- line-height: 20px;
- white-space: normal;
- "
- >{{ item.bankDepositBranch }}</span
- >
- </ws-form-item>
- <ws-form-item
- :class="item.accountTypeFlag == 1 ? 'personage' : 'company'"
- label="账号"
- span="1"
- prop="bankCard"
- class="el-car"
- >
- <div style="width: 100%">{{ item.bankCard }}</div>
- </ws-form-item>
- </ws-info-table>
- </div>
- </ws-form>
- </template>
- </el-table-column>
- <el-table-column type="index" label="序号" width="80">
- <template scope="scope">
- <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
- <span v-else>{{ scope.$index + 1 }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="driverName" label="姓名" width="100">
- </el-table-column>
- <el-table-column prop="numberCard" label="身份证号" width="200">
- </el-table-column>
- <el-table-column prop="driverPhone" label="手机号" width="160">
- </el-table-column>
- <el-table-column prop="carNumber" label="车牌号" width="160">
- <template scope="scope">
- <ws-select
- v-model="scope.row.carNumber"
- placeholder=""
- class="typeselect"
- @change="selectcar($event, scope.row)"
- >
- <ws-option
- v-for="item in scope.row.driverCarInfoList"
- :key="item.constKey"
- :label="item.carNumber"
- :value="item.carNumber"
- />
- </ws-select>
- </template>
- </el-table-column>
- <el-table-column prop="binNumber" label="常驻城市" width="160">
- <template slot-scope="scope">
- {{ scope.row.residentCityProvincial
- }}{{ scope.row.residentCityMunicipal }}
- </template>
- </el-table-column>
- <el-table-column prop="carModel" label="车型" width="120">
- </el-table-column>
- <el-table-column prop="carLength" label="车长" width="120">
- </el-table-column>
- <el-table-column label="结款账户" width="120">
- <template slot-scope="scope">
- <el-button
- v-if="!scope.row.expandsStatus"
- size="medium"
- type="text"
- class="fs-16"
- @click="expandsHandle(scope.row)"
- >展开<img
- width="9"
- height="6"
- style="vertical-align: middle; margin-left: 3px"
- src="../../../public/img/zhankai.png"
- alt=""
- /></el-button>
- <el-button
- v-if="scope.row.expandsStatus"
- size="medium"
- type="text"
- class="fs-16"
- @click="expandsHandle(scope.row)"
- >收起<img
- width="9"
- height="6"
- style="vertical-align: middle; margin-left: 3px"
- src="../../../public/img/shouqi.png"
- alt=""
- /></el-button>
- </template>
- </el-table-column>
- <el-table-column prop="addressUrl" label="附件">
- <template slot-scope="scope">
- <img
- width="18"
- height="20"
- style="vertical-align: text-top; position: relative; top: -1px"
- src="../../../public/img/fujian.png"
- @click="fujian(scope.row)"
- alt=""
- />
- <span v-if="scope.row.addressUrlArray.length > 0">{{
- scope.row.addressUrlArray.length
- }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="address" label="操作" >
- <template slot-scope="scope">
- <el-button size="medium" type="text" class="record" @click="look(scope.row)"
- >查看</el-button
- >
- <el-button size="medium" type="text" class="record" @click="edit(scope.row)"
- >编辑</el-button
- >
- <el-button size="medium" type="text" class="record" @click="deletes(scope.row)"
- >删除</el-button
- >
- <el-button
- v-if="scope.row.disableStatusFlag != 1"
- class="record1"
- size="medium"
- type="text"
-
- @click="stop(scope.row)"
- >禁用</el-button
- >
- <!-- <el-tooltip
- class="item record"
- effect="dark"
- :content="scope.row.disableReasons"
- placement="right-start"
- > -->
- <el-button
- v-if="scope.row.disableStatusFlag == 1"
- class="record1"
- size="medium"
- type="text"
- style="font-size:14px;color:#F83535;"
- @click="relieve(scope.row)"
- >已禁用</el-button
- >
- <!-- </el-tooltip> -->
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="currentPage"
- :page-size="deptCircularPage.pageSize"
- layout="total, sizes, prev, pager, next, jumper"
- :total="deptBudgetTotal"
- >
- </el-pagination>
- </div>
- <!-- <el-dialog v-model="outerVisible">
- <el-input
- type="textarea"
- :rows="2"
- placeholder="请输入禁用原因,不超过50个字"
- v-model="dsiablieForm"
- >
- </el-input>
- <template #footer>
- <div class="dialog-footer">
- <el-button @click="outerVisible = false">取 消</el-button>
- <el-button type="primary" @click="">确定禁用</el-button>
- </div>
- </template>
- </el-dialog> -->
- <WinseaContentModal
- v-model="outerVisible"
- title="禁用原因"
- @on-cancel="handleClose"
- >
- <el-input
- type="textarea"
- :rows="2"
- maxlength="50"
- placeholder="请输入禁用原因,不超过50个字"
- v-model="disablieForm.disableReasons"
- >
- </el-input>
- <div class="dialog-footer">
- <el-button @click="outerVisible = false">取 消</el-button>
- <el-button type="primary" @click="disableReasons">确定禁用</el-button>
- </div>
- </WinseaContentModal>
- <!-- 附件弹框 -->
- <WinseaContentModal
- v-model="accessoryTFs"
- :title="$t('system.noticeCircular.information')"
- @on-cancel="handleClose"
- >
- <p>查看附件</p>
- <div
- style="display: inline-block; margin: 5px"
- v-for="item in appendixIdss"
- >
- <img width="100" height="100" :src="item" alt="" />
- </div>
- </WinseaContentModal>
- <WinseaContentModal
- v-model="accesscard"
- :title="$t('system.noticeCircular.information')"
- @on-cancel="handleClose1"
- >
- <p>查看附件</p>
- <img width="100" height="100" :src="accessurl" alt="" />
- </WinseaContentModal>
- </div>
- </template>
- <script>
- import {
- selectDriver,
- billoperatehis,
- delDriver,
- disableDriver,
- } from '@/model/transport/index'
- import Pagination from '@/components/Pagination'
- import { provinceAndCityData, CodeToText } from 'element-china-area-data'
- import WsUpload from '@/components/WsUpload'
- import { dayjs, fmoney, EventBus } from 'base-core-lib'
- export default {
- name: 'viewSpareMoney',
- components: {
- WsUpload,
- Pagination,
- },
- watch: {
- vesselId(val) {
- this.getList()
- },
- isShow(val) {
- this.showType = val
- },
- },
- data() {
- return {
- //弹出框
- dialogViewSpareMoney: false,
- dialogApproveFormVisible: false,
- options_: provinceAndCityData,
- // 表格显示数据
- tableDate: [],
- // 是否显示
- showType: true,
- // 年
- year: '',
- deptBudgetTotal: 0,
- currentPage: 1,
- pageSize: 10,
- searchKeyWord: '',
- contractType: 2,
- startDate: null,
- endDate: null,
- carNumber: '',
- searchTypeText: [],
- outerVisible: false,
- //图片
- fileList: [],
- // 提交类型
- submitType: true,
- size: 10,
- spanArr: [],
- pcFlag:1,
- compId: sessionStorage.getItem('ws-pf_compId'),
- deptCircularPage: {},
- date: {
- year: dayjs().format('YYYY'),
- month: dayjs().format('MM'),
- },
- disablieForm: {},
- expands: [], //只展开一行放入当前行id
- getRowKeys: (row) => {
- //获取当前行id
- // console.log(row)
- return row.id //这里看这一行中需要根据哪个属性值是id
- },
- driverList: [],
- deptBudgetList: {},
- historyList: [],
- pickerBeginDateBefore: {
- disabledDate: (time) => {
- return time.getTime() > Date.now()
- },
- },
- appendixIdss: [],
- accessoryTFs: false,
- accesscard: false,
- accessurl: '',
- residentCityProvincial: '',
- residentCityMunicipal: '',
- }
- },
- activated() {
- this.getList()
- this.showType = this.isShow
- },
- methods: {
- expandsHandle(row) {
- row.expandsStatus = !row.expandsStatus
- this.$refs.expandstable.toggleRowExpansion(row)
- },
- edit(row) {
- this.$router.push({
- name: 'driverManagementedit',
- query: { id: row.id },
- })
- },
- //查找
- handleLook() {
- if (this.value2) {
- this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
- this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
- } else {
- this.startDate = ''
- this.endDate = ''
- }
- this.currentPage = 1
- this.getList()
- },
- look(row) {
- this.$router.push({
- name: 'driverManagementview',
- query: { id: row.id },
- })
- },
- //添加
- handleAdd() {
- console.log(11111)
- this.$router.push({ name: 'driverManagementadd' })
- },
- selectcar(e, row) {
- console.log(e, row)
- for (var i = 0; i < row.driverCarInfoList.length; i++) {
- if (e == row.driverCarInfoList[i].carNumber) {
- row.carModel = row.driverCarInfoList[i].carModel
- row.carLength = row.driverCarInfoList[i].carLength
- }
- }
- },
- stop(row) {
- this.outerVisible = true
- this.disablieForm.id = row.id
- },
- disableReasons() {
- this.outerVisible = false
- this.disablieForm.disableStatusFlag = 0
- disableDriver(this.disablieForm)
- .toPromise()
- .then((response) => {
- this.$notify.success({
- title: '成功',
- message: '禁用成功',
- })
- this.getList()
- })
- .catch((response) => {
- EventBus.$emit('error', response.message)
- })
- },
- relieve(row) {
- this.disablieForm.id = row.id
- this.disablieForm.disableStatusFlag = 1
- disableDriver(this.disablieForm)
- .toPromise()
- .then((response) => {
- this.$notify.success({
- title: '成功',
- message: '解除禁用成功',
- })
- this.getList()
- })
- .catch((response) => {
- EventBus.$emit('error', response.message)
- })
- },
- deletes(row) {
- this.$confirm(`司机信息删除后不可恢复,是否确定删除?`, '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- delDriver({ id: row.id })
- .toPromise()
- .then((response) => {
- this.$notify.success({
- title: '成功',
- message: '删除成功',
- })
- this.getList()
- })
- .catch((response) => {
- console.log(response)
- EventBus.$emit('error', response.message)
- })
- })
- .catch(() => {
- return false
- })
- },
- handleClose() {
- this.accessoryTFs = false
- },
- handleClose1() {
- this.accesscard = false
- },
- handleSizeChange(val) {
- console.log(`每页 ${val} 条`)
- this.pageSize = val
- this.getList()
- },
- handleCurrentChange(val) {
- this.currentPage = val
- console.log(`当前页: ${val}`)
- this.getList()
- },
- getList() {
- selectDriver({
- compId: sessionStorage.getItem('ws-pf_compId'),
- currentPage: this.currentPage,
- pageSize: this.pageSize,
- pcFlag:this.pcFlag,
- residentCityProvincial: this.residentCityProvincial,
- residentCityMunicipal: this.residentCityMunicipal,
- searchKeyWord: this.searchKeyWord,
- })
- .toPromise()
- .then((response) => {
- for (var i = 0; i < response.records.length; i++) {
- if(response.records[i].driverCarInfoList.length>0){
- response.records[i].carNumber =
- response.records[i].driverCarInfoList[0].carNumber
- response.records[i].carModel =
- response.records[i].driverCarInfoList[0].carModel
- response.records[i].carLength =
- response.records[i].driverCarInfoList[0].carLength
- }
- response.records[i].expandsStatus = false
- if (response.records[i].addressUrl != null) {
- response.records[i].addressUrlArray =
- response.records[i].addressUrl.split(',')
- this.fileList[i] = response.records[i].addressUrl.split(',')
- } else {
- response.records[i].addressUrlArray = []
- }
- }
- this.deptCircularPage.currentPage = response.current
- this.deptCircularPage.pageSize = response.size
- this.deptBudgetTotal = response.total
- this.driverList = response
- })
- },
- editClick(row) {
- var status = ''
- if (row.status == '待执行' || row.status == '已完成') {
- status = '执行中'
- } else if (row.status == '执行中') {
- status = '已完成'
- }
- //cancelButtonClass: "btn-custom-cancel"
- this.$confirm(`是否将状态改为${status}`, {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning',
- })
- .then(() => {
- editstatus({ id: row.id })
- .toPromise()
- .then((response) => {
- this.$notify.success({
- title: '成功',
- message: '状态修改成功',
- })
- this.getList()
- })
- .catch((response) => {
- // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
- })
- })
- .catch(() => {
- return false
- })
- },
- selecttaskType(e) {
- this.residentCityProvincial = CodeToText[e[0]]
- this.residentCityMunicipal = CodeToText[e[1]]
- // this.selectedOptions = e
- },
- fujian(row) {
- if (row.addressUrl === null || row.addressUrl === '') {
- EventBus.$emit(
- 'warning',
- this.$t('system.noticeCircular.NoInformation')
- )
- } else {
- this.accessoryTFs = true
- }
- this.appendixIdss = row.addressUrlArray
- },
- fujian1(item) {
- if (item.cardAddressUrl === null || item.cardAddressUrl === '') {
- EventBus.$emit(
- 'warning',
- this.$t('system.noticeCircular.NoInformation')
- )
- } else {
- this.accesscard = true
- }
- this.accessurl = item.cardAddressUrl
- },
- handleExamine(row) {
- this.$router.push({
- name: 'salesContractExamine',
- query: { id: row.id },
- })
- },
- // 关闭 dialog时 处理文件url 初始化upload组件
- handleCloe() {
- this.dialogViewSpareMoney = false
- },
- history(row) {
- console.log(row)
- billoperatehis({ id: row.id })
- .toPromise()
- .then((response) => {
- this.historyList = response
- })
- },
- find() {
- this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
- this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
- this.currentPage = 1
- this.getList()
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- .connert {
- width: 90%;
- margin: 0 auto;
- }
- .vertical-text-left {
- width: 62px;
- text-align: right;
- }
- .findValue {
- margin: 0 10px;
- }
- /deep/.el-icon-arrow-right {
- display: none;
- }
- /deep/.el-pagination {
- text-align: center;
- }
- .ws-info-table {
- border-left: 1px solid #e9ecf7;
- border-top: 1px solid #e9ecf7;
- }
- /deep/.ws-info-table .el-form-item {
- border-right: 1px solid #e9ecf7;
- border-bottom: 1px solid #e9ecf7;
- }
- /deep/.ws-info-table .el-form-item .el-form-item__label {
- text-align: center;
- background: #f6f7fc;
- color: #8890b1;
- font-size: 12px;
- }
- /deep/.ws-info-table .el-form-item.company,
- /deep/.ws-info-table .el-form-item.personage {
- width: 33.333%;
- }
- /deep/.ws-info-table .el-form-item.name {
- width: 15.665%;
- }
- /deep/.ws-info-table .el-form-item.card {
- width: 17.665%;
- }
- /deep/.ws-info-table .el-form-item .el-form-item__content {
- text-align: center;
- border-left: 1px solid #e9ecf7;
- }
- /deep/.el-table .el-table__header .cell,
- /deep/.el-table .el-table__body .cell {
- text-align: center;
- }
- /deep/.el-table th.is-leaf,
- .el-table td {
- border-right: 1px solid #eee;
- }
- .el-button--text {
- color: #5878e8;
- }
- .el-button--primary {
- background: #5878e8;
- }
- //操作按钮
- .record,
- .adjustment ,.record1{
- display: inline-block;
- color: #5878e8;
- padding: 0 4px !important;
- position: relative;
- font-size: 14px;
- }
- .record1{
- width: 38px;
- height: 32px;
- }
- .record:after {
- position: absolute;
- content: '';
- display: block;
- top: 9px;
- right: -7px;
- width: 1px;
- height: 12px;
- background: #e9ecf7;
- }
- /deep/.el-table td{
- border-right: 1px solid #eee;
- }
- </style>
|