|
@@ -17,7 +17,7 @@
|
|
|
<el-table-column fixed="right" label="操作" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
- @click="coproductSendClick(scope.row.saleOrderId)"
|
|
|
+ @click="coproductSendClick(scope.row)"
|
|
|
type="text"
|
|
|
size="small"
|
|
|
>副产品派车</el-button
|
|
@@ -55,111 +55,122 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { getCookie } from "@/utils/util.js";
|
|
|
+import { getCookie } from '@/utils/util.js'
|
|
|
export default {
|
|
|
- name: "saleOrder",
|
|
|
+ name: 'saleOrder',
|
|
|
data() {
|
|
|
return {
|
|
|
- activeName: "four",
|
|
|
- input: "",
|
|
|
+ activeName: 'four',
|
|
|
+ input: '',
|
|
|
carrierId: null,
|
|
|
carrierName: null,
|
|
|
option4: {
|
|
|
// 表格请求数据的地址
|
|
|
- requestUrl: ""
|
|
|
+ requestUrl: ''
|
|
|
},
|
|
|
//记录旧的row对象 (销售公司已审批)
|
|
|
- oldRow: "",
|
|
|
+ oldRow: '',
|
|
|
//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
|
|
|
oldRowCount: 1,
|
|
|
tableHead: [
|
|
|
{
|
|
|
- prop: "materialName",
|
|
|
- label: "物资名称",
|
|
|
+ prop: 'materialName',
|
|
|
+ label: '物资名称',
|
|
|
width: 150
|
|
|
},
|
|
|
{
|
|
|
- prop: "specificationModel",
|
|
|
- label: "规格型号",
|
|
|
+ prop: 'specificationModel',
|
|
|
+ label: '规格型号',
|
|
|
width: 150
|
|
|
},
|
|
|
{
|
|
|
- prop: "materialNumber",
|
|
|
- label: "物资件数",
|
|
|
+ prop: 'materialNumber',
|
|
|
+ label: '物资件数',
|
|
|
width: 100
|
|
|
},
|
|
|
{
|
|
|
- prop: "materialWeight",
|
|
|
- label: "物资重量",
|
|
|
+ prop: 'materialWeight',
|
|
|
+ label: '物资重量',
|
|
|
width: 100
|
|
|
}
|
|
|
],
|
|
|
//(销售公司已审批)
|
|
|
tableData: []
|
|
|
- };
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
- this.initUrl();
|
|
|
+ this.initUrl()
|
|
|
},
|
|
|
methods: {
|
|
|
initUrl() {
|
|
|
- if (getCookie("orgCode") == "chengyunshang") {
|
|
|
+ if (getCookie('orgCode') == 'chengyunshang') {
|
|
|
this.option4.requestUrl =
|
|
|
- "/api/v1/ams/getSaleOrderListByCarrierSsoId?apiId=409&carrierSsoId=" +
|
|
|
- getCookie("userId");
|
|
|
+ '/api/v1/ams/getSaleOrderListByCarrierSsoId?apiId=409&carrierSsoId=' +
|
|
|
+ getCookie('userId')
|
|
|
} else {
|
|
|
this.option4.requestUrl =
|
|
|
- "/api/v1/ams/getSaleOrderListByCarrierSsoId?apiId=409";
|
|
|
+ '/api/v1/ams/getSaleOrderListByCarrierSsoId?apiId=409'
|
|
|
}
|
|
|
},
|
|
|
refresh() {
|
|
|
- this.$router.go(0);
|
|
|
+ this.$router.go(0)
|
|
|
},
|
|
|
handleClick(tab, event) {
|
|
|
- console.log(tab, event);
|
|
|
+ console.log(tab, event)
|
|
|
},
|
|
|
onclick() {
|
|
|
- if (this.activeName == "four") {
|
|
|
+ if (this.activeName == 'four') {
|
|
|
this.option4.requestUrl =
|
|
|
- "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con=" +
|
|
|
- this.input;
|
|
|
+ '/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con=' +
|
|
|
+ this.input
|
|
|
}
|
|
|
},
|
|
|
- coproductSendClick(saleOrderId) {
|
|
|
- this.$router.push("/addSaleOrderCoproductSendCarrier/" + saleOrderId);
|
|
|
+ coproductSendClick(row) {
|
|
|
+ this.$router.push('/addSaleOrderCoproductSendCarrier/' + row.saleOrderId)
|
|
|
+ // this.axios
|
|
|
+ // .post('/api/v1/ams/getSaleOrderStatus?saleNumber=' + row.saleNumber)
|
|
|
+ // .then(res => {
|
|
|
+ // console.log(res.data.data)
|
|
|
+ // if (res.data.data == 7) {
|
|
|
+ // this.$message.error('该订单在金蝶已关闭,无法派车')
|
|
|
+ // return
|
|
|
+ // } else {
|
|
|
+
|
|
|
+ // }
|
|
|
+ // })
|
|
|
},
|
|
|
// -------查看物资详情 (已审批)
|
|
|
detailclick(row) {
|
|
|
// 记录重复点击次数
|
|
|
if (this.oldRow === row) {
|
|
|
- this.oldRowCount += 1;
|
|
|
+ this.oldRowCount += 1
|
|
|
}
|
|
|
// 切换当前详情表
|
|
|
- this.$refs.table.toggleRowExpansion(row);
|
|
|
+ this.$refs.table.toggleRowExpansion(row)
|
|
|
// 打开前关闭上一个详情表
|
|
|
- if (this.oldRow != "") {
|
|
|
+ if (this.oldRow != '') {
|
|
|
if (this.oldRow != row) {
|
|
|
if (this.oldRowCount % 2 === 1) {
|
|
|
- this.$refs.table.toggleRowExpansion(this.oldRow);
|
|
|
+ this.$refs.table.toggleRowExpansion(this.oldRow)
|
|
|
} else {
|
|
|
- this.oldRowCount = 1;
|
|
|
+ this.oldRowCount = 1
|
|
|
}
|
|
|
} else {
|
|
|
- this.oldRow = null;
|
|
|
- return;
|
|
|
+ this.oldRow = null
|
|
|
+ return
|
|
|
}
|
|
|
}
|
|
|
// 重置上一个点击对象
|
|
|
- this.oldRow = row;
|
|
|
+ this.oldRow = row
|
|
|
// 根据销售订单id查询物资信息
|
|
|
this.axios
|
|
|
- .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
|
|
|
+ .post('/api/v1/ams/getSaleMaterialList?saleOrderId=' + row.saleOrderId)
|
|
|
.then(res => {
|
|
|
- this.tableData = res.data.data;
|
|
|
- });
|
|
|
+ this.tableData = res.data.data
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
-};
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.salePlan {
|