|
@@ -6,7 +6,7 @@
|
|
|
size="small"
|
|
size="small"
|
|
|
:inline="true"
|
|
:inline="true"
|
|
|
v-show="showSearch"
|
|
v-show="showSearch"
|
|
|
- label-width="68px"
|
|
|
|
|
|
|
+ label-width="100px"
|
|
|
>
|
|
>
|
|
|
<el-form-item label="用户姓名" prop="cName">
|
|
<el-form-item label="用户姓名" prop="cName">
|
|
|
<el-input
|
|
<el-input
|
|
@@ -63,14 +63,14 @@
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="虚拟订单状态" prop="status">
|
|
|
|
|
|
|
+ <el-form-item label="虚拟订单状态" prop="virtualOrderAllocation">
|
|
|
<el-select
|
|
<el-select
|
|
|
- v-model="queryParams.status"
|
|
|
|
|
|
|
+ v-model="queryParams.virtualOrderAllocation"
|
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
|
clearable
|
|
clearable
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in orderStatus"
|
|
|
|
|
|
|
+ v-for="item in dict.type.local_voa_status"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
@@ -174,10 +174,11 @@
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column> -->
|
|
</el-table-column> -->
|
|
|
<el-table-column label="时间" align="center" prop="dtCreateTime" />
|
|
<el-table-column label="时间" align="center" prop="dtCreateTime" />
|
|
|
- <el-table-column label="虚拟技师订单" width="100" align="center" prop="status">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-tag v-if="scope.row.status == 2">查看记录</el-tag>
|
|
|
|
|
- <el-tag type="warning" v-else @click="onClickRecord">未分配</el-tag>
|
|
|
|
|
|
|
+ <el-table-column label="虚拟技师订单" width="100" align="center" prop="virtualOrderAllocation">
|
|
|
|
|
+ <!-- 虚拟技师订单分配情况(0:真实订单 1:未分配 2:已分配) -->
|
|
|
|
|
+ <template slot-scope="scope" v-if="scope.row.virtualOrderFlag == 1">
|
|
|
|
|
+ <el-tag v-if="scope.row.virtualOrderAllocation == 2" @click="onClickRecord(scope.row)">查看记录</el-tag>
|
|
|
|
|
+ <el-tag type="warning" v-else>未分配</el-tag>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<!-- <el-table-column label="推荐者id" align="center" prop="cTjOpenId" /> -->
|
|
<!-- <el-table-column label="推荐者id" align="center" prop="cTjOpenId" /> -->
|
|
@@ -203,7 +204,8 @@
|
|
|
size="mini"
|
|
size="mini"
|
|
|
type="text"
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
icon="el-icon-edit"
|
|
|
- @click="handleInfo(scope.row)"
|
|
|
|
|
|
|
+ v-if="scope.row.virtualOrderFlag == 1 && scope.row.virtualOrderAllocation == 1"
|
|
|
|
|
+ @click="handleAllocation(scope.row)"
|
|
|
>分配</el-button>
|
|
>分配</el-button>
|
|
|
<!-- <el-button
|
|
<!-- <el-button
|
|
|
size="mini"
|
|
size="mini"
|
|
@@ -279,6 +281,7 @@
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
v-model="form.address"
|
|
v-model="form.address"
|
|
|
placeholder="请输入地址"
|
|
placeholder="请输入地址"
|
|
|
|
|
+ style="width: 100%"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="备注" prop="cNote">
|
|
<el-form-item label="备注" prop="cNote">
|
|
@@ -413,8 +416,10 @@
|
|
|
<el-button @click="istransfer = false">取 消</el-button>
|
|
<el-button @click="istransfer = false">取 消</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
- <!-- 虚拟订单记录 -->
|
|
|
|
|
- <VOrderRecord ref="vor" />
|
|
|
|
|
|
|
+ <!-- 订单分配记录 -->
|
|
|
|
|
+ <AOrderRecord ref="aor" />
|
|
|
|
|
+ <!-- 订单分配 -->
|
|
|
|
|
+ <AOrderAction ref="aoa" @close="getList" />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -429,13 +434,15 @@ import {
|
|
|
exportOrder,
|
|
exportOrder,
|
|
|
transferOrder,
|
|
transferOrder,
|
|
|
} from "@/api/system/order";
|
|
} from "@/api/system/order";
|
|
|
-import VOrderRecord from "./vOrderRecord.vue";
|
|
|
|
|
|
|
+import AOrderAction from "./orderAllocationAction.vue";
|
|
|
|
|
+import AOrderRecord from "./orderAllocationRecord.vue";
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "Order",
|
|
name: "Order",
|
|
|
- dicts: ['vOrderStatus', 'sys_job_status'],
|
|
|
|
|
|
|
+ dicts: ['local_voa_status'],
|
|
|
components: {
|
|
components: {
|
|
|
- VOrderRecord
|
|
|
|
|
|
|
+ AOrderAction,
|
|
|
|
|
+ AOrderRecord
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -516,9 +523,6 @@ export default {
|
|
|
created() {
|
|
created() {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
},
|
|
},
|
|
|
- mounted() {
|
|
|
|
|
- console.log(this.dict, this.$store)
|
|
|
|
|
- },
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
//转单
|
|
//转单
|
|
|
transferOrder() {
|
|
transferOrder() {
|
|
@@ -544,10 +548,12 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
getJsList(deptId) {
|
|
getJsList(deptId) {
|
|
|
- let data = {};
|
|
|
|
|
- data.deptId = deptId;
|
|
|
|
|
- data.nStatus = 0;
|
|
|
|
|
- getjsList(data).then((res) => {
|
|
|
|
|
|
|
+ this.jsList = [];
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ deptId: deptId,
|
|
|
|
|
+ nStatus: 0,
|
|
|
|
|
+ };
|
|
|
|
|
+ getjsList(params).then((res) => {
|
|
|
res.data.records.forEach((item) => {
|
|
res.data.records.forEach((item) => {
|
|
|
this.jsList.push({
|
|
this.jsList.push({
|
|
|
value: item.id,
|
|
value: item.id,
|
|
@@ -569,9 +575,10 @@ export default {
|
|
|
/** 查询认领列表 */
|
|
/** 查询认领列表 */
|
|
|
getList() {
|
|
getList() {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
- listOrder(this.queryParams).then((response) => {
|
|
|
|
|
- this.orderList = response.data.records;
|
|
|
|
|
- this.total = response.data.total;
|
|
|
|
|
|
|
+ listOrder(this.queryParams).then((res) => {
|
|
|
|
|
+ this.orderList = res.data.records;
|
|
|
|
|
+ this.total = res.data.total;
|
|
|
|
|
+ }).finally(() => {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -641,29 +648,45 @@ export default {
|
|
|
this.depart = "";
|
|
this.depart = "";
|
|
|
this.arrival = "";
|
|
this.arrival = "";
|
|
|
this.takeOrder = row.nStatus;
|
|
this.takeOrder = row.nStatus;
|
|
|
- this.jsList = [];
|
|
|
|
|
this.getJsList(row.deptId);
|
|
this.getJsList(row.deptId);
|
|
|
// this.reset();
|
|
// this.reset();
|
|
|
- const cId = {
|
|
|
|
|
- cId: row.cId || this.ids,
|
|
|
|
|
- };
|
|
|
|
|
this.subShow = false;
|
|
this.subShow = false;
|
|
|
this.open = true;
|
|
this.open = true;
|
|
|
this.title = "详情";
|
|
this.title = "详情";
|
|
|
- listOrder(cId).then((response) => {
|
|
|
|
|
- console.log(response.data.records[0]);
|
|
|
|
|
-
|
|
|
|
|
- this.form = response.data.records[0];
|
|
|
|
|
- let Longitude = this.form.arrivalLongitude;
|
|
|
|
|
- let numLatitude = +this.form.arrivalLatitude;
|
|
|
|
|
- let Latitude = numLatitude.toFixed(6);
|
|
|
|
|
- let location = Longitude + `,` + Latitude;
|
|
|
|
|
- let arrival = "arrival"; //到达
|
|
|
|
|
- this.fetchLocation(arrival, location);
|
|
|
|
|
- let depart = "depart"; //出发
|
|
|
|
|
- this.fetchLocation(depart, location);
|
|
|
|
|
|
|
+ listOrder({ cId: row.cId }).then((response) => {
|
|
|
|
|
+ if (response.data.records.length > 0) {
|
|
|
|
|
+ this.form = response.data.records[0];
|
|
|
|
|
+ let Longitude = this.form.arrivalLongitude;
|
|
|
|
|
+ let numLatitude = +this.form.arrivalLatitude;
|
|
|
|
|
+ let Latitude = numLatitude.toFixed(6);
|
|
|
|
|
+ let location = Longitude + `,` + Latitude;
|
|
|
|
|
+ let arrival = "arrival"; //到达
|
|
|
|
|
+ this.fetchLocation(arrival, location);
|
|
|
|
|
+ let depart = "depart"; //出发
|
|
|
|
|
+ this.fetchLocation(depart, location);
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ /** 删除按钮操作 */
|
|
|
|
|
+ handleDelete(row) {
|
|
|
|
|
+ const cIds = {
|
|
|
|
|
+ cId: row.cId || this.ids,
|
|
|
|
|
+ };
|
|
|
|
|
+ this.$modal
|
|
|
|
|
+ .confirm('是否确认删除订单编号为"' + row.orderNo + '"的数据项?')
|
|
|
|
|
+ .then(function () {
|
|
|
|
|
+ return delOrder(cIds);
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.getList();
|
|
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ // 分配操作
|
|
|
|
|
+ handleAllocation(row) {
|
|
|
|
|
+ this.$refs.aoa.open({ cId: row.cId });
|
|
|
|
|
+ },
|
|
|
/**解析经纬度 */
|
|
/**解析经纬度 */
|
|
|
async fetchLocation(title, location) {
|
|
async fetchLocation(title, location) {
|
|
|
const key = "5457092e6c62b83c1b2e45dbe973d858";
|
|
const key = "5457092e6c62b83c1b2e45dbe973d858";
|
|
@@ -705,25 +728,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- /** 删除按钮操作 */
|
|
|
|
|
- handleDelete(row) {
|
|
|
|
|
- const cIds = {
|
|
|
|
|
- cId: row.cId || this.ids,
|
|
|
|
|
- };
|
|
|
|
|
- this.$modal
|
|
|
|
|
- .confirm('是否确认删除订单编号为"' + row.orderNo + '"的数据项?')
|
|
|
|
|
- .then(function () {
|
|
|
|
|
- return delOrder(cIds);
|
|
|
|
|
- })
|
|
|
|
|
- .then(() => {
|
|
|
|
|
- this.getList();
|
|
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
|
|
- })
|
|
|
|
|
- .catch(() => {});
|
|
|
|
|
- },
|
|
|
|
|
// 虚拟订单记录查看
|
|
// 虚拟订单记录查看
|
|
|
- onClickRecord() {
|
|
|
|
|
- this.$refs.vor.open();
|
|
|
|
|
|
|
+ onClickRecord(row) {
|
|
|
|
|
+ this.$refs.aor.open({ orderNo: row.orderNo });
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
@@ -740,9 +747,6 @@ export default {
|
|
|
height: 800px;
|
|
height: 800px;
|
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
|
}
|
|
}
|
|
|
-::v-deep .el-form-item__label {
|
|
|
|
|
- width: 100px !important;
|
|
|
|
|
-}
|
|
|
|
|
::v-deep .el-input__inner {
|
|
::v-deep .el-input__inner {
|
|
|
color: #333 !important;
|
|
color: #333 !important;
|
|
|
}
|
|
}
|
|
@@ -753,9 +757,6 @@ export default {
|
|
|
float: right;
|
|
float: right;
|
|
|
padding: 30px 0;
|
|
padding: 30px 0;
|
|
|
}
|
|
}
|
|
|
-.orderDetails .el-form-item {
|
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
|
-}
|
|
|
|
|
.transferPopup {
|
|
.transferPopup {
|
|
|
width: 100vw;
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
height: 100vh;
|