| | |
| | | <Button @click="addEquipment" type="primary" icon="md-add">添加片区段</Button> |
| | | <Button @click="init" icon="md-refresh">刷新</Button> |
| | | </Row> |
| | | <Table :loading="loading" border :columns="columns2" :data="data2" ref="table" |
| | | sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"> |
| | | |
| | | |
| | | <Table :loading="loading" border :columns="columns2" :data="data2" ref="table" style="height: 400px" > |
| | | sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect" > |
| | | </Table> |
| | | </Modal> |
| | | <Modal :title="modalTitle3" v-model="customerVisible" :mask-closable="false" :width="1050"> |
| | | <Row class="operation" style="padding-bottom: 20px"> |
| | | <Button @click="addCustomer" type="primary" icon="md-add">添加</Button> |
| | | <Button @click="init" icon="md-refresh">刷新</Button> |
| | | <Input v-model="searchForm.name" suffix="ios-search" @on-change="getCustList" placeholder="输入商户名称搜索" clearable style="width: 250px" |
| | | <Input v-model="searchForm.customerName" suffix="ios-search" @on-change="getCustList" placeholder="输入商户名称搜索" clearable style="width: 250px" |
| | | /> |
| | | </Row> |
| | | <Table :loading="loading" border :columns="columns3" :data="data3" ref="table" |
| | | sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"> |
| | | </Table> |
| | | <Row type="flex" justify="end" class="page"> |
| | | <Page :current="searchForm.pageNumber" :total="total2" |
| | | <Page :current.sync="searchForm.pageNumber" :total="total2" |
| | | :page-size="searchForm.pageSize" |
| | | @on-change="changePage" |
| | | @on-change="changePage1" |
| | | @on-page-size-change="changePageSize" |
| | | :page-size-opts="[10, 20, 50]" |
| | | size="small" |
| | | show-total |
| | | show-elevator |
| | | show-sizer |
| | | ></Page> |
| | | </Row> |
| | | </Modal> |
| | | <Modal :title="modalTitle" v-model="addEquipmentVisible" :mask-closable="false" :width="500"> |
| | | <Modal :title="modalTitle" v-model="addEquipmentVisible" :mask-closable="false" :width="500" > |
| | | <Form ref="areaSectionForm" :model="areaSectionForm" :label-width="80" :rules="areaSectionFormValidate"> |
| | | <FormItem label="片区名称" prop="code"> |
| | | <Input v-model="areaSectionForm.code" /> |
| | | <Input v-model="areaSectionForm.name" /> |
| | | </FormItem> |
| | | |
| | | </Form> |
| | |
| | | </div> |
| | | </Modal> |
| | | <Modal :title="modalTitle" v-model="addCustomerVisible" :mask-closable="false" :width="550"> |
| | | <Form ref="customerForm" :model="customerForm" :label-width="80" :rules="areaSectionFormValidate"> |
| | | <Form ref="customerForm" :model="customerForm" :label-width="120" :rules="areaSectionFormValidate"> |
| | | <FormItem label="商户名称" prop="name"> |
| | | <Input v-model="customerForm.name" /> |
| | | </FormItem> |
| | |
| | | </Col> |
| | | <Col span="12"> |
| | | <FormItem label="联系方式" prop="phone"> |
| | | <Input v-model="customerForm.phone" type="number"/> |
| | | <Input v-model="customerForm.phone"/> |
| | | </FormItem> |
| | | </Col> |
| | | </Row> |
| | |
| | | <FormItem label="联系人" prop="linker"> |
| | | <Input v-model="customerForm.linker" /> |
| | | </FormItem> |
| | | <FormItem label="零售许可证信息" prop="licence"> |
| | | <FormItem label="零售许可证信息" prop="licence" > |
| | | <Input v-model="customerForm.licence" /> |
| | | </FormItem> |
| | | </Form> |
| | |
| | | addCar, |
| | | getCarList, |
| | | getUser, |
| | | getDriver, |
| | | addArea, |
| | | deleteArea, |
| | | getAreaSection, |
| | |
| | | title: "片区描述", |
| | | key: "description", |
| | | width: 442, |
| | | render: (h, params) => { |
| | | return h("div",params.row.description=="undefined" ? '':params.row.description); |
| | | } |
| | | }, |
| | | { |
| | | title: "配送人", |
| | |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "分段编号或名称", |
| | | key: "code", |
| | | title: "分段名称", |
| | | key: "name", |
| | | }, |
| | | { |
| | | title: "操作", |
| | | key: "action", |
| | | align: "center", |
| | | |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h( |
| | |
| | | { |
| | | title: "商户名称", |
| | | key: "name", |
| | | width: 100, |
| | | tooltip:true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: "商户编号", |
| | | key: "code", |
| | | minWidth: 120, |
| | | key: "licence", |
| | | minWidth: 140, |
| | | }, |
| | | { |
| | | title: "联系方式", |
| | | key: "phone", |
| | | width: 140, |
| | | width: 135, |
| | | }, |
| | | { |
| | | title: "状态", |
| | | key: "status", |
| | | width:100, |
| | | sortable: true, |
| | | render: (h, params) => { |
| | | let re = ""; |
| | | if (params.row.status == 0) { |
| | |
| | | ]); |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | title: "上次配送日期", |
| | | key: "lastTime", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: "商户注册地址", |
| | | key: "registeredAddress", |
| | | width: 180, |
| | | }, |
| | | { |
| | | title: "联系人", |
| | |
| | | data2: [], |
| | | data3: [], |
| | | total: 0, |
| | | |
| | | type: { |
| | | type : 1 |
| | | }, |
| | | total2: 0, |
| | | permData: [], |
| | | editRolePermId: "", |
| | |
| | | this.getDataList(); |
| | | this.clearSelectAll(); |
| | | }, |
| | | changePage1(v) { |
| | | this.searchForm.pageNumber = v; |
| | | this.getCustomerList(this.areaSectionId); |
| | | }, |
| | | changePageSize(v) { |
| | | this.searchForm.pageSize = v; |
| | | this.getDataList(); |
| | |
| | | }, |
| | | getCustList() { |
| | | this.loading = true; |
| | | this.searchForm.pageNumber=1; |
| | | getCustomer(this.searchForm).then((res) => { |
| | | this.loading = false; |
| | | if (res.success) { |
| | |
| | | this.total2 = res.result.total; |
| | | } |
| | | }); |
| | | this.$emit('update:current',this.searchForm.pageNumber); |
| | | }, |
| | | getAllUser(){ |
| | | getUser().then((res)=>{ |
| | | getDriver({type:1}).then((res)=>{ |
| | | if (res.success){ |
| | | this.userList=res.result; |
| | | } |
| | |
| | | this.$Message.success("操作成功"); |
| | | this.getDataList(); |
| | | this.roleModalVisible = false; |
| | | this.areaForm={}; |
| | | } |
| | | }); |
| | | } else { |
| | | this.submitLoading = true; |
| | | this.$delete(this.areaForm,'children') |
| | | addArea(this.areaForm).then((res) => { |
| | | this.submitLoading = false; |
| | | if (res.success) { |
| | | this.$Message.success("操作成功"); |
| | | this.getDataList(); |
| | | this.roleModalVisible = false; |
| | | this.areaForm={}; |
| | | } |
| | | }); |
| | | } |
| | |
| | | this.$refs.areaForm.resetFields(); |
| | | delete this.areaForm.id; |
| | | this.customerVisible = true; |
| | | console.log(this.areaSectionId); |
| | | }, |
| | | addCar() { |
| | | this.getAllUser(); |
| | |
| | | let str = JSON.stringify(v); |
| | | let roleInfo = JSON.parse(str); |
| | | this.areaForm = roleInfo; |
| | | console.log(this.areaForm); |
| | | this.roleModalVisible = true; |
| | | }, |
| | | editEquipment(v) { |