|
@@ -2,10 +2,28 @@
|
|
|
<!-- 销售订单页面 -->
|
|
|
<div class="salePlan">
|
|
|
<div class="top">
|
|
|
+ <span>制单时间:</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="startTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择日期"
|
|
|
+ style="width:200px"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ <span>至</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="endTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择日期"
|
|
|
+ style="width:200px"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
<el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
|
|
|
+
|
|
|
<el-button type="primary" class="btn" @click="onclick">
|
|
|
<i class="el-icon-search"></i>查询
|
|
|
</el-button>
|
|
|
+
|
|
|
<el-button type="primary" @click="refresh">
|
|
|
<i class="el-icon-refresh"></i>刷新
|
|
|
</el-button>
|
|
@@ -69,17 +87,31 @@
|
|
|
</el-tab-pane>
|
|
|
<!-- 已派车 -->
|
|
|
<el-tab-pane label="已派车" name="first">
|
|
|
- <mergeRowTable v-bind.sync="option" ref="table3"> </mergeRowTable>
|
|
|
+ <mergeRowTable v-bind.sync="option" ref="table3">
|
|
|
+ <el-table-column fixed="right" label="操作" width="160">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ @click="updateDriverTel(scope)"
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ >修改司机电话号码</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </mergeRowTable>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { sjTime } from "@/utils/sharedJsFile";
|
|
|
export default {
|
|
|
name: "saleOrder",
|
|
|
data() {
|
|
|
return {
|
|
|
+ endTime: null,
|
|
|
+ startTime: null,
|
|
|
carrierText: null,
|
|
|
dialogTableVisible: false,
|
|
|
activeName: "four",
|
|
@@ -91,8 +123,8 @@ export default {
|
|
|
option: {
|
|
|
// 表格请求数据的地址
|
|
|
requestUrl: "/api/v1/ams/getHaveCarTruckNoList?apiId=466",
|
|
|
- comparison: "saleOrderMaterialId",
|
|
|
- columnIndexs: [0, 1, 2, 3, 7, 8, 9, 10, 11, 12, 13, 14, 15]
|
|
|
+ comparison: "orderId",
|
|
|
+ columnIndexs: [0, 1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16]
|
|
|
},
|
|
|
option2: {
|
|
|
// 表格请求数据的地址
|
|
@@ -123,6 +155,40 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
+ updateDriverTel(scope) {
|
|
|
+ console.log(scope.row);
|
|
|
+ this.$prompt(
|
|
|
+ `请输入--${scope.row.capacityNumber}--修改后的电话号码`,
|
|
|
+ `${scope.row.capacityNumber}--修改前的电话号码:${scope.row.drivelTel}`,
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ inputPlaceholder: "输入正确格式的电话号码",
|
|
|
+ center: true
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(({ value }) => {
|
|
|
+ this.axios
|
|
|
+ .post("/api/v1/uc/updateDriverTel", {
|
|
|
+ orderId: parseInt(scope.row.orderId),
|
|
|
+ driverTel: value
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ if (res.data.code == "200") {
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ this.getRequestUrl();
|
|
|
+ } else {
|
|
|
+ this.$message.error("修改失败");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message.error("修改失败");
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message.info("取消修改");
|
|
|
+ });
|
|
|
+ },
|
|
|
getRequestUrl() {
|
|
|
this.option.requestUrl =
|
|
|
"/api/v1/ams/getHaveCarTruckNoList?apiId=466&i=" + new Date();
|
|
@@ -167,6 +233,12 @@ export default {
|
|
|
console.log(tab, event);
|
|
|
},
|
|
|
onclick() {
|
|
|
+ let startTime = null;
|
|
|
+ let endTime = null;
|
|
|
+ if (this.startTime && this.endTime) {
|
|
|
+ startTime = sjTime(this.startTime);
|
|
|
+ endTime = sjTime(this.endTime);
|
|
|
+ }
|
|
|
if (this.activeName == "four") {
|
|
|
this.option4.requestUrl =
|
|
|
"/api/v1/ams/getSteelTruckNoList?apiId=411&con=" + this.input;
|
|
@@ -176,7 +248,14 @@ export default {
|
|
|
"/api/v1/ams/getNoCarTruckNoList?apiId=466&con=" + this.input;
|
|
|
} else if (this.activeName == "first") {
|
|
|
this.option.requestUrl =
|
|
|
- "/api/v1/ams/getHaveCarTruckNoList?apiId=466&con=" + this.input;
|
|
|
+ "/api/v1/ams/getHaveCarTruckNoList?apiId=466&con=" +
|
|
|
+ this.input +
|
|
|
+ "&startTime=" +
|
|
|
+ startTime +
|
|
|
+ "&endTime=" +
|
|
|
+ endTime +
|
|
|
+ "&i=" +
|
|
|
+ new Date();
|
|
|
}
|
|
|
},
|
|
|
seeclick(saleOrderId) {
|