haoyahui
2023-11-22 9834dbff448908d2008d8c52a2544aad00c099b1
admin-web/src/views/stock/inventorycount/inventorytask/inventory.vue
@@ -13,7 +13,7 @@
        v-loading="loading"
        :data="formData.formInventoryGoodsList"
        :rules="rules"
        height="400"
        height="500"
        :stripe="true"
        class="the-table"
      >
@@ -46,7 +46,7 @@
<script>
import winMd from '@/components/win/win-md';
import myButton from '@/components/myButton/myButton';
import { inventoryQuery, inventoryTemporaryStorage, inventoryFinish } from '@/api/stock/inventory';
import { inventoryQuery, inventoryTemporaryStorage, inventoryFinish, inventoryDetail } from '@/api/stock/inventory';
export default {
  components: { winMd, myButton },
  props: {
@@ -78,35 +78,30 @@
    console.log('info', info);
    if (info.states == 1) {
      // 继续盘点
      inventoryDetail({ id: this.setting.id }).then((res) => {
        this.formData = res;
        this.formData.id = this.setting.id;
      });
    } else {
      inventoryQuery({ id: this.setting.id }).then((res) => {
        this.formData = res;
        this.formData.id = this.setting.id;
      });
    }
      inventoryQuery({ id: this.setting.id }).then((res) => {
        this.formData = res;
        this.formData.id = this.setting.id;
      });
  },
  methods: {
    close() {
      this.$emit('close');
    },
    staging() {
      this.$refs['ruleForm'].validate((valid) => {
        if (valid) {
          const params = {
            ...this.formData,
            inventoryGoodsList: this.formData.formInventoryGoodsList,
          };
          inventoryTemporaryStorage(params).then(() => {
            this.$message.success('暂存成功!');
            this.close();
            this.$emit('search');
          });
        }
      const params = {
        id: this.formData.id,
        inventoryGoodsList: this.formData.formInventoryGoodsList,
      };
      inventoryTemporaryStorage(params).then(() => {
        this.$message.success('暂存成功!');
        this.close();
        this.$emit('search');
      });
    },
    save() {