|
@@ -2,18 +2,169 @@
|
|
|
<template>
|
|
|
<div class="sale">
|
|
|
<div class="top">
|
|
|
- <span>车牌号:</span>
|
|
|
- <el-input placeholder="请输入内容" class="input" v-model="inputText" clearable>
|
|
|
- </el-input>
|
|
|
- <el-button type="primary" class="btn" @click="onclick(0)">
|
|
|
- <i class="el-icon-search"></i>查询
|
|
|
- </el-button>
|
|
|
- <el-button type="primary" class="bt" @click="onclick(1)">
|
|
|
- <i class="el-icon-plus"></i>新增排队插队
|
|
|
- </el-button>
|
|
|
+ <el-form :inline="true" style="margin-top: 1rem;">
|
|
|
+ <el-form-item>
|
|
|
+ <label class="el-form-item__label" style="width: auto;">车牌号</label>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="capacityNo"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="btn"
|
|
|
+ @click="onclick"
|
|
|
+ style="margin-left: 4px;"
|
|
|
+ clearable
|
|
|
+ ><i class="el-icon-search"></i>查询</el-button
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="btn"
|
|
|
+ @click="onclickMaterial"
|
|
|
+ style="margin-left: 4px;"
|
|
|
+ clearable
|
|
|
+ ><i class="el-icon-search"></i>查询物资</el-button
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ ><el-button type="primary" class="btn" @click="allow">
|
|
|
+ <i class="el-icon-d-arrow-right"></i>插队
|
|
|
+ </el-button></el-form-item
|
|
|
+ >
|
|
|
+ </el-form>
|
|
|
</div>
|
|
|
- <div class="tab">
|
|
|
- <dilTable v-bind.sync="option"></dilTable>
|
|
|
+ <!-- 物资选择模态框 -->
|
|
|
+ <el-drawer
|
|
|
+ title="选择物资信息"
|
|
|
+ :visible.sync="table1"
|
|
|
+ direction="rtl"
|
|
|
+ size="90%"
|
|
|
+ :show-close="true"
|
|
|
+ >
|
|
|
+ <el-form :inline="true" style="margin-top: 0.5rem;">
|
|
|
+ <el-form-item>
|
|
|
+ <label class="el-form-item__label" style="width: auto;"
|
|
|
+ >物资名称</label
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="materialNameText"
|
|
|
+ clearable
|
|
|
+ ></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <label class="el-form-item__label" style="width: auto;">规格</label>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入内容"
|
|
|
+ v-model="materialSpecificationText"
|
|
|
+ clearable
|
|
|
+ ><template slot="prepend">Φ</template></el-input
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ class="btn"
|
|
|
+ @click="onclickMaterial1"
|
|
|
+ style="margin-left: 4px;"
|
|
|
+ ><i class="el-icon-search"></i>查询</el-button
|
|
|
+ >
|
|
|
+ <el-button type="primary" @click="makeSureMaterial"
|
|
|
+ ><i class="el-icon-check"></i>确定</el-button
|
|
|
+ >
|
|
|
+ </el-form>
|
|
|
+ <div class="tablecls">
|
|
|
+ <!-- 查询所有的物资 -->
|
|
|
+ <dilTable
|
|
|
+ v-bind.sync="optionMa"
|
|
|
+ @selection-change="selectionChange2"
|
|
|
+ @rowDbClick="rowDbClick"
|
|
|
+ >
|
|
|
+ </dilTable>
|
|
|
+ </div>
|
|
|
+ </el-drawer>
|
|
|
+ <div class="tabs">
|
|
|
+ <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="单拼车辆排队链表" name="first">
|
|
|
+ <el-table
|
|
|
+ :data="tableData1"
|
|
|
+ border
|
|
|
+ style="width: 100%; margin-top: 20px"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ max-height="500px"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55"></el-table-column>
|
|
|
+ <el-table-column type="index" width="50"> </el-table-column>
|
|
|
+ <el-table-column prop="capacityNumber" label="车牌号" fit>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="resultStartTime" label="排队开始时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="listNodeOrder"
|
|
|
+ label="序号"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column prop="materialName" label="物资名称">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="materialSpecification" label="物资规格">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="materialModel" label="物资型号">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="materialNumber" label="物资件数">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="driverTel" label="司机电话号码">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="sureTime" label="可进厂确认时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="resultInsertTime" label="插队时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="gatepostName" label="进厂门岗">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="多拼车辆排队链表" name="second">
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ :span-method="objectSpanMethod"
|
|
|
+ border
|
|
|
+ style="width: 100%; margin-top: 20px"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ max-height="500px"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55"></el-table-column>
|
|
|
+ <el-table-column prop="capacityNumber" label="车牌号" fit>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="grid" label="拼数" fit> </el-table-column>
|
|
|
+ <el-table-column prop="resultStartTime" label="排队开始时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="listNodeOrder"
|
|
|
+ label="序号"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column prop="materialName" label="物资名称">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="materialSpecification" label="物资规格">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="materialModel" label="物资型号">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="materialNumber" label="物资件数">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="driverTel" label="司机电话号码">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="gatepostName" label="进厂门岗">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="resultInsertTime" label="插队时间">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="sureTime" label="可进厂确认时间">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -21,25 +172,215 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ capacityNo: "",
|
|
|
inputText: "",
|
|
|
- option: {
|
|
|
+ optionMa: {
|
|
|
// 表格请求数据的地址
|
|
|
- requestUrl: "/api/v1/qms/getQueueInsert?apiId=132",
|
|
|
+ requestUrl: "",
|
|
|
+ // 控制显示多选列
|
|
|
+ selectionType: "select"
|
|
|
},
|
|
|
+ activeName: "first",
|
|
|
+ tableData: [],
|
|
|
+ tableData1: [],
|
|
|
+ //存放每一行记录的合并数
|
|
|
+ spanArr: [],
|
|
|
+ maplist: [],
|
|
|
+ id: null,
|
|
|
+ option: [],
|
|
|
+ filterArr1: [],
|
|
|
+ table1: false,
|
|
|
+ //物资选中表格
|
|
|
+ materialList: [],
|
|
|
+ //物资选中暂存
|
|
|
+ materialList1: [],
|
|
|
+ //物资信息查询内容
|
|
|
+ materialNameText: null,
|
|
|
+ materialSpecificationText: null,
|
|
|
+ materialModelText: null
|
|
|
};
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ activeName() {}
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getSpellingArray();
|
|
|
+ this.getNoSpellingArray();
|
|
|
+ },
|
|
|
methods: {
|
|
|
- onclick(num) {
|
|
|
- if (num == 0) {
|
|
|
- this.option.requestUrl =
|
|
|
- "/api/v1/qms/getQueueInsert?apiId=132&con=" + this.inputText+"&i="+new Date();
|
|
|
- } else if (num == 1) {
|
|
|
- this.$router.push({
|
|
|
- path: "/addqueueFJumpLine",
|
|
|
+ rowDbClick(row) {
|
|
|
+ this.materialList = [];
|
|
|
+ this.materialList.push(row);
|
|
|
+ this.makeSureMaterial();
|
|
|
+ },
|
|
|
+ //物资模态框查询
|
|
|
+ onclickMaterial1() {
|
|
|
+ this.optionMa.requestUrl =
|
|
|
+ "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
|
|
|
+ this.materialNameText +
|
|
|
+ "&materialSpecificationText=" +
|
|
|
+ this.materialSpecificationText;
|
|
|
+ },
|
|
|
+ onclickMaterial() {
|
|
|
+ this.table1 = true;
|
|
|
+ this.optionMa.requestUrl =
|
|
|
+ "/api/v1/uc/getSteelMaterial?apiId=244&i=" + new Date();
|
|
|
+ console.log("dasd");
|
|
|
+ },
|
|
|
+ //返回选中的物资信息
|
|
|
+ selectionChange2(selection) {
|
|
|
+ this.materialList1 = [];
|
|
|
+ this.materialList1 = selection;
|
|
|
+ this.materialList = this.materialList.concat(this.materialList1);
|
|
|
+ },
|
|
|
+ makeSureMaterial() {
|
|
|
+ console.log(this.materialList);
|
|
|
+ var materialIdList = [];
|
|
|
+ this.materialList.forEach(e => {
|
|
|
+ if (materialIdList.indexOf(e.materialId) == -1) {
|
|
|
+ materialIdList.push(e.materialId);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ let map = {
|
|
|
+ materialList: materialIdList
|
|
|
+ };
|
|
|
+ this.materialList = [];
|
|
|
+ this.materialList1 = [];
|
|
|
+ if (this.activeName == "first") {
|
|
|
+ this.axios
|
|
|
+ .post("/api/v1/qms/getQueueListByQueueUp?isSpelling=0", map)
|
|
|
+ .then(res => {
|
|
|
+ this.tableData1 = res.data.data;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.axios
|
|
|
+ .post("/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1", map)
|
|
|
+ .then(res => {
|
|
|
+ this.tableData = res.data.data;
|
|
|
+ this.getSpanArr(this.tableData);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.table1 = false;
|
|
|
+ },
|
|
|
+ //记录每一行的合并数
|
|
|
+ getSpanArr(data) {
|
|
|
+ //每次调用方法初始化
|
|
|
+ this.spanArr = [];
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ if (i === 0) {
|
|
|
+ this.spanArr.push(1);
|
|
|
+ this.pos = 0;
|
|
|
+ } else {
|
|
|
+ // 判断当前元素与上一个元素是否相同
|
|
|
+ if (data[i].resultTotalId === data[i - 1].resultTotalId) {
|
|
|
+ this.spanArr[this.pos] += 1;
|
|
|
+ this.spanArr.push(0);
|
|
|
+ } else {
|
|
|
+ this.spanArr.push(1);
|
|
|
+ this.pos = i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
+ if (
|
|
|
+ columnIndex === 0 ||
|
|
|
+ columnIndex === 1 ||
|
|
|
+ columnIndex === 2 ||
|
|
|
+ columnIndex === 3 ||
|
|
|
+ columnIndex === 4 ||
|
|
|
+ columnIndex === 9 ||
|
|
|
+ columnIndex === 10 ||
|
|
|
+ columnIndex === 12
|
|
|
+ ) {
|
|
|
+ const _row = this.spanArr[rowIndex];
|
|
|
+ const _col = _row > 0 ? 1 : 0;
|
|
|
+ return {
|
|
|
+ rowspan: _row,
|
|
|
+ colspan: _col
|
|
|
+ };
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleClick() {
|
|
|
+ if (this.activeName == "first") {
|
|
|
+ this.getNoSpellingArray();
|
|
|
+ } else {
|
|
|
+ this.getSpellingArray();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getNoSpellingArray() {
|
|
|
+ this.axios
|
|
|
+ .post("/api/v1/qms/getQueueListByQueueUp?isSpelling=0&i=" + new Date())
|
|
|
+ .then(res => {
|
|
|
+ this.tableData1 = res.data.data;
|
|
|
});
|
|
|
+ },
|
|
|
+ getSpellingArray() {
|
|
|
+ this.axios
|
|
|
+ .post(
|
|
|
+ "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=" +
|
|
|
+ new Date()
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ this.tableData = res.data.data;
|
|
|
+ console.log(this.tableData);
|
|
|
+ this.getSpanArr(this.tableData);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onclick() {
|
|
|
+ if (this.activeName == "first") {
|
|
|
+ this.option1.requestUrl =
|
|
|
+ "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=0?capacityNumber=" +
|
|
|
+ this.capacityNo +
|
|
|
+ "&i=" +
|
|
|
+ new Date();
|
|
|
+ } else {
|
|
|
+ this.axios
|
|
|
+ .post(
|
|
|
+ "/api/v1/qms/getQueueListByQueueUp?apiId=473&isSpelling=1&i=" +
|
|
|
+ new Date() +
|
|
|
+ "&capacityNumber=" +
|
|
|
+ this.capacityNo
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ this.tableData = res.data.data;
|
|
|
+ this.getSpanArr(this.tableData);
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
- },
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.maplist = [];
|
|
|
+ this.maplist = selection;
|
|
|
+ },
|
|
|
+ updateBill(scope) {
|
|
|
+ console.log(scope.row.capacityId);
|
|
|
+ this.$router.push(
|
|
|
+ `/editBill/${scope.row.capacityId}/${scope.row.capacityNumber}`
|
|
|
+ );
|
|
|
+ },
|
|
|
+ filterArr(resultId) {
|
|
|
+ console.log("fdhjsaj");
|
|
|
+ this.filterArr1 = this.filterArr1.concat(
|
|
|
+ this.tableData.filter(ele => ele.resultId == resultId)
|
|
|
+ );
|
|
|
+ },
|
|
|
+ allow() {
|
|
|
+ if (this.maplist.length == 0) {
|
|
|
+ this.$message.error("请选择需要插队的车辆");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let map = {
|
|
|
+ mapList: this.maplist
|
|
|
+ };
|
|
|
+ this.axios.post("/api/v1/qms/queueCutInLine", map).then(res => {
|
|
|
+ if (res.data.code == "200") {
|
|
|
+ this.$message.success("插队成功,等待放行");
|
|
|
+ this.getNoSpellingArray();
|
|
|
+ this.getSpellingArray();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
@@ -50,13 +391,26 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
padding-left: 40px;
|
|
|
- .input{
|
|
|
- width: 250px;
|
|
|
- margin-right: 20px;
|
|
|
+ .el-form {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ .el-form-item__label {
|
|
|
+ align-items: center;
|
|
|
+ line-height: 80px;
|
|
|
+ }
|
|
|
}
|
|
|
- .bt{
|
|
|
- margin-left: 20px;
|
|
|
+ }
|
|
|
+ .input {
|
|
|
+ width: 250px;
|
|
|
+ margin-right: 20px;
|
|
|
+ }
|
|
|
+ .tabs {
|
|
|
+ margin-left: 20px;
|
|
|
+ margin-top: 10px;
|
|
|
+ .tabs /deep/ .el-tabs__nav {
|
|
|
+ font-size: 40px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|