石广澎
2023-11-29 20913c80c3f5fc8e533cb92b90e6f20bcd68e032
admin-web/src/views/stock/transfer/transferApplication/index.vue
@@ -12,7 +12,7 @@
            <div class="table-tool-bar" style="margin-bottom: 15px">
              <my-button name="调拨申请" icon="el-icon-plus" @click="handleAdd" site="tools" size="medium" />
            </div>
            <div :style="{ 'overflow-y': 'auto', height: `${clientHeight - 320}px` }" v-loading="loading">
            <div :style="{ 'overflow-y': 'auto', height: 'calc(100vh - 352px)' }" v-loading="loading">
              <el-row v-if="list.length" class="card" :gutter="5">
                <el-col v-for="(item, index) in list" :key="index" class="cm-item">
                  <el-card class="card-data">
@@ -87,7 +87,7 @@
                  </el-card>
                </el-col>
              </el-row>
              <div class="no-data" v-else>暂无数据</div>
              <el-empty v-else description="暂无数据"></el-empty>
            </div>
            <el-pagination
              :small="false"
@@ -121,14 +121,14 @@
</template>
<script>
import { transferList, transferUpdStatus, transfeIncome, transferExport } from '@/api/stock/transfer';
import {transfeIncome, transferExport, transferList, transferUpdStatus} from '@/api/stock/transfer';
import MyButton from '@/components/myButton/myButton';
import myImport from '@/views/components/myImport';
import edit from './edit';
import detail from './detail';
import listPage from '../../../mixins/listPage';
import transfer from '../../../mixins/transfer';
import { commonsApi } from '@/api/commonsApi';
import SettingIplatform from '@/utils/settingIplatform';
export default {
  name: 'index',
@@ -149,11 +149,17 @@
          defaultValue: '',
        },
        {
          type: 'text',
          dataIndex: 'goodsTemplateName',
          type: 'select',
          dataIndex: 'goodsTemplateId',
          label: '物品名称',
          placeholder: '可模糊搜索',
          placeholder: '请输入',
          defaultValue: '',
          options: [],
          optionsConfig: {
            label: 'goodsName',
            value: 'id',
            url: SettingIplatform.apiBaseURL + '/pc/base/goods/template/query/goodsTemplate',
          },
        },
        {
          type: 'select',
@@ -220,11 +226,25 @@
    // 入库
    handleIncome(row) {
      this.$confirm(`您确定 单号:${row.businessFormCode}  接收入库吗?`, '接收入库').then(() => {
        transfeIncome({ id: row.id }).then((res) => {
          this.$message.success('接收入库成功!');
          this.search(1);
        });
      this.$confirm(`您确定 单号:${row.businessFormCode}  接收入库吗?`, '接收入库', {
        beforeClose: (action, instance, done) => {
          if (action == 'confirm') {
            instance.confirmButtonLoading = true;
            instance.confirmButtonText = '执行中...';
            transfeIncome({ id: row.id })
              .then((res) => {
                this.$message.success('接收入库成功!');
                done();
                instance.confirmButtonLoading = false;
                this.search(1);
              })
              .catch(() => {
                done();
              });
          } else {
            done();
          }
        },
      });
    },