فهرست منبع

京东订单接收

cz 2 سال پیش
والد
کامیت
0b5c693633
3فایلهای تغییر یافته به همراه450 افزوده شده و 70 حذف شده
  1. 19 1
      src/api/inbound-outbound/transfer.js
  2. 58 69
      src/views/inbound-outbound/transfer/JDtransfer.vue
  3. 373 0
      src/views/inbound-outbound/transfer/aa.vue

+ 19 - 1
src/api/inbound-outbound/transfer.js

@@ -1,6 +1,6 @@
 import request from '@/router/axios'
 
-// 调仓列表 
+// 调仓列表
 export function transferList(data = {}) {
   return request({
     url: '/api/victoriatourist/stockTransfer/page',
@@ -10,6 +10,16 @@ export function transferList(data = {}) {
 }
 
 
+// 京东订单接收列表 
+export function transferList1(data = {}) {
+  return request({
+    url: '/api/victoriatourist/stockTransfer/page1',
+    method: 'post',
+    data: data,
+  })
+}
+
+
 
 // 调仓
 export function sendTransfer(data = {}) {
@@ -28,6 +38,14 @@ export function receive(data = {}) {
     data: data,
   })
 }
+// 接收
+export function receive1(data = {}) {
+  return request({
+    url: '/api/victoriatourist/stockTransfer/receive1',
+    method: 'post',
+    data: data,
+  })
+}
 
 // 调仓详情
 export function transferDetails(data = {}) {

+ 58 - 69
src/views/inbound-outbound/transfer/JDtransfer.vue

@@ -54,7 +54,7 @@ export default {
           data: [],
         },
         {
-          label: "调仓状态",
+          label: "接收状态",
           prop: "inStatus",
           data: [],
         },
@@ -116,7 +116,7 @@ export default {
   methods: {
     getList() {
       this.loading = true;
-      API.transferList(this.queryParams).then(
+      API.transferList1(this.queryParams).then(
         (res) => {
           this.tableList = res.data.data.records;
           this.total = res.data.data.total;
@@ -165,20 +165,30 @@ export default {
       );
     },
     handleReceive(row) {
+      console.log(row.stockTransferList, "as");
+      const arr = row.stockTransferList.map((x) => ({
+        productName: x.productName,
+        inQuantity: 0,
+        outQuantity: Number(x.outQuantity),
+        id: x.id,
+        inStatus: x.inStatus,
+      }));
       this.openOne = true;
       this.formOne = {
-        id: row.id,
-        inQuantity: "",
-        canSum: Number(row.outQuantity),
+        stockTransferList: arr,
       };
     },
     handleSubmitOne() {
       this.$refs.formOne.validate((valid) => {
         if (valid) {
-          if (Number(this.formOne.inQuantity) > this.formOne.canSum) {
-            return this.msgInfo("数量不可大于调出数量");
+          const list = this.formOne.stockTransferList;
+          for (let i = 0; i < list.length; i++) {
+            const element = list[i];
+            if (element.inQuantity > element.outQuantity) {
+              return this.msgInfo("数量不可大于调出数量");
+            }
           }
-          API.receive(this.formOne).then(() => {
+          API.receive1(this.formOne.stockTransferList).then(() => {
             this.msgSuccess("接收成功");
             this.openOne = false;
             this.getList();
@@ -190,7 +200,8 @@ export default {
     showAddress(row) {
       return (
         <div>
-          {row.countryName} , {row.provinceName} , {row.cityName}
+          {row.countryName} , {row.provinceName} , {row.cityName} ,{" "}
+          {row.detailedAddress}
         </div>
       );
     },
@@ -218,71 +229,31 @@ export default {
       ></query>
       <el-table :data="tableList" v-loading="loading">
         <el-table-column
-          label="物品编码"
+          label="订单编号"
           align="left"
           prop="code"
           width="150"
         />
-        <el-table-column label="物品名称" align="left" prop="name" />
-        <el-table-column label="规格" align="left" prop="specs" />
-        <el-table-column
-          label="调出仓库"
-          align="left"
-          prop="outWarehouseName"
-          width="150"
-        />
-        <el-table-column
-          label="调出数量"
-          align="left"
-          prop="outQuantity"
-          width="110"
-        />
-        <el-table-column
-          label="操作人"
-          align="left"
-          prop="outUserName"
-          width="120"
-        />
-        <el-table-column
-          label="调入仓库"
-          align="left"
-          prop="inWarehouseName"
-          width="150"
-        />
+        <el-table-column label="订单金额" align="left" prop="amountMoney" />
         <el-table-column
-          label="接收数量"
+          label="地址"
           align="left"
-          prop="inQuantity"
-          width="120"
-        />
-        <el-table-column
-          label="接收人"
-          align="left"
-          prop="inUserName"
-          width="120"
+          prop="specs"
+          :formatter="showAddress"
         />
+        <el-table-column label="联系人" align="left" prop="contacts" />
+        <el-table-column label="手机号" align="left" prop="phone" width="110" />
         <el-table-column
           label="状态"
           align="left"
           prop="inStatus"
-          width="100"
-          :formatter="
-            (row) => {
-              if (row.inStatus === 0) {
-                return '待接收';
-              } else {
-                return '已接收';
-              }
-            }
-          "
+          :formatter="(row) => (row.inStatus == 0 ? '未接收' : '已接收')"
         />
         <el-table-column label="操作" align="center" width="120">
           <template slot-scope="scope">
             <el-button
               type="text"
-              v-if="
-                scope.row.inStatus === 0 && Number(scope.row.outQuantity) > 0
-              "
+              v-if="scope.row.inStatus === 0"
               @click="handleReceive(scope.row)"
               >接收
             </el-button>
@@ -329,17 +300,35 @@ export default {
         label-width="100px"
         label-position="right"
       >
-        <el-form-item label="调出数量" prop="canSum">
-          <el-input v-model="formOne.canSum" size="small" disabled> </el-input>
-        </el-form-item>
-        <el-form-item label="接收数量" prop="inQuantity">
-          <el-input
-            v-model="formOne.inQuantity"
-            placeholder="请输入接收数量"
-            size="small"
-          >
-          </el-input>
-        </el-form-item>
+        <el-table :data="formOne.stockTransferList">
+          <el-table-column label="物品名称" prop="productName">
+          </el-table-column>
+          <el-table-column label="调出数量" prop="outQuantity">
+          </el-table-column>
+          <el-table-column label="接收数量" prop="inQuantity">
+            <template slot-scope="scope">
+              <el-form-item
+                :prop="'stockTransferList.' + scope.$index + '.inQuantity'"
+                :rules="rules.inQuantity"
+                :inline-message="true"
+                label-width="0"
+                style="margin-bottom: 0px"
+              >
+                <el-input-number
+                  v-model="scope.row.inQuantity"
+                  label="请输入"
+                  style="width: 100%"
+                  size="mini"
+                  :controls="false"
+                  :min="0"
+                  :max="9999999"
+                  :disabled="scope.row.inStatus == 1"
+                >
+                </el-input-number>
+              </el-form-item>
+            </template>
+          </el-table-column>
+        </el-table>
       </el-form>
       <div style="text-align: center; margin-top: 15px">
         <el-button size="small" @click="openOne = false">取消 </el-button>

+ 373 - 0
src/views/inbound-outbound/transfer/aa.vue

@@ -0,0 +1,373 @@
+
+
+<script>
+import test from "@/components/form-test/index.vue";
+import query from "@/components/query/index.vue";
+
+import * as API from "@/api/inbound-outbound/transfer.js";
+
+import { warehouseSelectList } from "@/api/product-material/warehouse/index.js";
+import sendTransfer from "./sendTransfer.vue";
+
+export default {
+  components: {
+    test,
+    query,
+    sendTransfer,
+  },
+  data() {
+    return {
+      warehouseSelectList: [],
+      warehouseTypeList: [],
+      btnForm: {
+        otherButton: {
+          list: [
+            {
+              name: "发起调仓",
+              methodsText: "send",
+              type: "primary",
+              send: () => {
+                this.handleSend();
+              },
+            },
+          ],
+        },
+      },
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        type: "1",
+        keyword: "",
+        outWarehouseId: "",
+        inWarehouseId: "",
+        inStatus: "",
+      },
+      selectConfig: [
+        {
+          label: "调出仓库",
+          prop: "outWarehouseId",
+          data: [],
+        },
+        {
+          label: "调入仓库",
+          prop: "inWarehouseId",
+          data: [],
+        },
+        {
+          label: "调仓状态",
+          prop: "inStatus",
+          data: [],
+        },
+      ],
+      tableList: [],
+      total: 0,
+      loading: false,
+      titleText: "发起调仓",
+      open: false,
+      form: {
+        outWarehouseId: "",
+        inWarehouseId: "",
+        remark: "",
+        changeProductList: [],
+      },
+      openOne: false,
+      formOne: {},
+      rules: {
+        inQuantity: [
+          {
+            required: true,
+            message: "请输入接收数量",
+            trigger: "blur",
+          },
+        ],
+      },
+    };
+  },
+  created() {
+    const businessDictData = JSON.parse(
+      window.localStorage.getItem("businessDict")
+    );
+    this.warehouseTypeList = businessDictData.find(
+      (item) => item.code === "warehouseType"
+    ).children;
+    warehouseSelectList().then((res) => {
+      this.warehouseSelectList = res.data.data;
+      this.selectConfig[0].data = this.warehouseSelectList.map((item) => ({
+        label: item.name,
+        value: item.id,
+      }));
+      this.selectConfig[1].data = this.warehouseSelectList.map((item) => ({
+        label: item.name,
+        value: item.id,
+      }));
+    });
+    this.selectConfig[2].data = [
+      {
+        label: "待接收",
+        value: "0",
+      },
+      {
+        label: "已接收",
+        value: "1",
+      },
+    ];
+    this.getList();
+  },
+  methods: {
+    getList() {
+      this.loading = true;
+      API.transferList(this.queryParams).then(
+        (res) => {
+          this.tableList = res.data.data.records;
+          this.total = res.data.data.total;
+          this.loading = false;
+        },
+        (err) => {
+          console.log("transferList: " + err);
+          this.loading = false;
+        }
+      );
+    },
+    handleQuery() {
+      this.getList();
+    },
+    handleSend() {
+      this.form = {
+        outWarehouseId: "",
+        inWarehouseId: "",
+        remark: "",
+        changeProductList: [],
+      };
+      this.open = true;
+    },
+    handleCancel() {
+      this.form = {
+        outWarehouseId: "",
+        inWarehouseId: "",
+        remark: "",
+        changeProductList: [],
+      };
+      this.open = false;
+    },
+
+    handleSubmit() {
+      API.sendTransfer(this.form).then(
+        () => {
+          this.msgSuccess("添加成功");
+          this.$refs.sendTransfer.loading = false;
+          this.open = false;
+          this.getList();
+        },
+        (err) => {
+          console.log("sendTransfer: " + err);
+          this.$refs.sendTransfer.loading = false;
+        }
+      );
+    },
+    handleReceive(row) {
+      this.openOne = true;
+      this.formOne = {
+        id: row.id,
+        inQuantity: "",
+        canSum: Number(row.outQuantity),
+      };
+    },
+    handleSubmitOne() {
+      this.$refs.formOne.validate((valid) => {
+        if (valid) {
+          if (Number(this.formOne.inQuantity) > this.formOne.canSum) {
+            return this.msgInfo("数量不可大于调出数量");
+          }
+          API.receive(this.formOne).then(() => {
+            this.msgSuccess("接收成功");
+            this.openOne = false;
+            this.getList();
+          });
+        }
+      });
+    },
+
+    showAddress(row) {
+      return (
+        <div>
+          {row.countryName} , {row.provinceName} , {row.cityName}
+        </div>
+      );
+    },
+  },
+};
+</script>
+
+
+<template>
+  <div class="box-card">
+    <!-- <el-card class="header">
+      <test :form-config="btnForm"></test>
+    </el-card> -->
+    <el-card class="body-main">
+      <query
+        :selectConfig="selectConfig"
+        :req="queryParams"
+        :isShowMore="true"
+        @handleQuery="handleQuery"
+        @handleMore="
+          () => {
+            queryDialog = true;
+          }
+        "
+      ></query>
+      <el-table :data="tableList" v-loading="loading">
+        <el-table-column
+          label="物品编码"
+          align="left"
+          prop="code"
+          width="150"
+        />
+        <el-table-column label="物品名称" align="left" prop="name" />
+        <el-table-column label="规格" align="left" prop="specs" />
+        <el-table-column
+          label="调出仓库"
+          align="left"
+          prop="outWarehouseName"
+          width="150"
+        />
+        <el-table-column
+          label="调出数量"
+          align="left"
+          prop="outQuantity"
+          width="110"
+        />
+        <el-table-column
+          label="操作人"
+          align="left"
+          prop="outUserName"
+          width="120"
+        />
+        <el-table-column
+          label="调入仓库"
+          align="left"
+          prop="inWarehouseName"
+          width="150"
+        />
+        <el-table-column
+          label="接收数量"
+          align="left"
+          prop="inQuantity"
+          width="120"
+        />
+        <el-table-column
+          label="接收人"
+          align="left"
+          prop="inUserName"
+          width="120"
+        />
+        <el-table-column
+          label="状态"
+          align="left"
+          prop="inStatus"
+          width="100"
+          :formatter="
+            (row) => {
+              if (row.inStatus === 0) {
+                return '待接收';
+              } else {
+                return '已接收';
+              }
+            }
+          "
+        />
+        <el-table-column label="操作" align="center" width="120">
+          <template slot-scope="scope">
+            <el-button
+              type="text"
+              v-if="
+                scope.row.inStatus === 0 && Number(scope.row.outQuantity) > 0
+              "
+              @click="handleReceive(scope.row)"
+              >接收
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </el-card>
+
+    <el-dialog
+      :title="titleText"
+      :visible.sync="open"
+      v-if="open"
+      width="80%"
+      top="60px"
+    >
+      <send-transfer
+        :form="form"
+        :warehouseSelectList="warehouseSelectList"
+        :warehouseTypeList="warehouseTypeList"
+        @submit="handleSubmit"
+        @cancel="handleCancel"
+        ref="sendTransfer"
+      ></send-transfer>
+    </el-dialog>
+
+    <el-dialog
+      title="接收"
+      :visible.sync="openOne"
+      v-if="openOne"
+      width="30%"
+      top="20vh"
+    >
+      <el-form
+        ref="formOne"
+        :model="formOne"
+        :rules="rules"
+        label-width="100px"
+        label-position="right"
+      >
+        <el-form-item label="调出数量" prop="canSum">
+          <el-input v-model="formOne.canSum" size="small" disabled> </el-input>
+        </el-form-item>
+        <el-form-item label="接收数量" prop="inQuantity">
+          <el-input
+            v-model="formOne.inQuantity"
+            placeholder="请输入接收数量"
+            size="small"
+          >
+          </el-input>
+        </el-form-item>
+      </el-form>
+      <div style="text-align: center; margin-top: 15px">
+        <el-button size="small" @click="openOne = false">取消 </el-button>
+        <el-button type="primary" size="small" @click="handleSubmitOne">
+          确定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+
+<style lang="scss" scoped>
+.box-card {
+  height: calc(100vh - 110px);
+  overflow-y: auto;
+  display: flex;
+  flex-direction: column;
+  // .header {
+  //   // height: 100px;
+  //   margin-bottom: 10px;
+  //   box-sizing: border-box;
+  // }
+  .body-main {
+    height: calc(100vh - 110px);
+
+    flex: 1;
+    overflow-y: auto;
+  }
+}
+</style>