123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <template>
- <!-- 销售订单页面 -->
- <div class="salePlan">
- <div class="top">
- <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>
- </div>
- <div class="table">
- <mergeRowTable v-bind.sync="option4" ref="table">
- <el-table-column fixed="right" label="操作" width="100">
- <template slot-scope="scope">
- <el-button
- @click="steelSendClick(scope.row.saleOrderId)"
- type="text"
- size="small"
- >钢材派车</el-button
- >
- </template>
- </el-table-column>
- </mergeRowTable>
- </div>
- </div>
- </template>
- <script>
- import { getCookie } from "@/utils/util.js";
- export default {
- name: "saleOrder",
- data() {
- return {
- activeName: "four",
- drawer: false,
- input: "",
- index: "",
- carrierId: null,
- carrierName: null,
- option4: {
- // 表格请求数据的地址
- requestUrl: "",
- comparison: "saleNumber",
- columnIndexs: [0, 1, 2, 3, 7, 8, 9, 10, 11, 12, 13, 14, 15]
- },
- mapList: [],
- mapItemList: [],
- //(销售公司已审批)
- tableData: []
- };
- },
- created() {
- this.initUrl();
- },
- methods: {
- initUrl() {
- if (getCookie("orgCode") == "chengyunshang") {
- this.option4.requestUrl =
- "/api/v1/ams/getSaleOrderListToCarrier?apiId=467&carrierSsoId=" +
- getCookie("userId");
- } else {
- this.option4.requestUrl =
- "/api/v1/ams/getSaleOrderListToCarrier?apiId=467&carrierSsoId=" +
- null;
- }
- },
- refresh() {
- this.$router.go(0);
- },
- handleClick(tab, event) {
- console.log(tab, event);
- },
- onclick() {
- if (getCookie("orgCode") == "chengyunshang") {
- if (this.activeName == "four") {
- this.option4.requestUrl =
- "/api/v1/ams/getSaleOrderListToCarrier?apiId=467&carrierSsoId=" +
- getCookie("userId") +
- "&con=" +
- this.input;
- }
- } else {
- if (this.activeName == "four") {
- this.option4.requestUrl =
- "/api/v1/ams/getSaleOrderListToCarrier?apiId=467&con=" +
- this.input +
- "&carrierSsoId=" +
- "";
- }
- }
- },
- seeclick(saleOrderId) {
- this.$router.push("/saleOrderDetail/" + saleOrderId);
- },
- steelSendClick(saleOrderId) {
- this.$router.push("/addSaleOrderSteelSendCarrier/" + saleOrderId);
- },
- // -------查看物资详情 (已审批)
- detailclick(row) {
- // 记录重复点击次数
- if (this.oldRow === row) {
- this.oldRowCount += 1;
- }
- // 切换当前详情表
- this.$refs.table.toggleRowExpansion(row);
- // 打开前关闭上一个详情表
- if (this.oldRow != "") {
- if (this.oldRow != row) {
- if (this.oldRowCount % 2 === 1) {
- this.$refs.table.toggleRowExpansion(this.oldRow);
- } else {
- this.oldRowCount = 1;
- }
- } else {
- this.oldRow = null;
- return;
- }
- }
- // 重置上一个点击对象
- this.oldRow = row;
- // 根据销售订单id查询物资信息
- this.axios
- .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
- .then(res => {
- this.tableData = res.data.data;
- });
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .salePlan {
- .top {
- margin-left: 20px;
- margin-top: 20px;
- .el-input {
- width: 20%;
- margin-right: 1.25rem;
- }
- }
- .table {
- margin-left: 20px;
- margin-top: 20px;
- }
- }
- </style>
|