li.shaoyi před 4 roky
rodič
revize
d68fbf269c

+ 183 - 183
src/common/components/echart/echart-timeline/index.vue

@@ -13,193 +13,193 @@ import { handleEchart } from './setup';
 import moment from 'moment';
 
 export default defineComponent({
-    name: 'EchartTime',
-    emits: ['change'],
-    components: {
-        EchartBase,
+  name: 'EchartTime',
+  emits: ['change'],
+  components: {
+    EchartBase,
+  },
+  props: {
+    // 实时行情数据
+    quoteData: {
+      type: Object as PropType<QueryQuoteDayRsp>,
+      required: true,
     },
-    props: {
-        // 实时行情数据
-        quoteData: {
-            type: Object as PropType<QueryQuoteDayRsp>,
-            required: true,
+  },
+  setup(props, { emit }) {
+    const loading = ref(false);
+    const isEmpty = ref(false);
+    const historyIndexs: number[] = []; // 行情历史数据中所有非补充数据的索引位置(用于计算均线)
+    const { chartData, options, updateOptions, initOptions } = handleEchart();
+
+    // 处理图表数据
+    const handleData = (rawData: QueryTSDataRsp): void => {
+      historyIndexs.length = 0; // 清空数据
+      const datas: number[] = [],
+        times: string[] = [],
+        xAxisTimes: string[] = [],
+        yestclose = rawData.preSettle,
+        decimal = rawData.decimalPlace;
+
+      // 历史行情日期
+      rawData.historyDatas.forEach((item, index) => {
+        const { c, ts } = item;
+        datas.push(c);
+        times.push(moment(ts).format('YYYY-MM-DD HH:mm:ss'));
+        if (!item.f) historyIndexs.push(index);
+      });
+
+      // 时间轴(开盘交易时间)
+      rawData.runSteps.forEach((item) => {
+        const { start, end } = item;
+        const rangeTime = getRangeTime(start, end, 'HH:mm', 'm');
+        xAxisTimes.push(...rangeTime);
+      });
+
+      chartData.value = {
+        yestclose,
+        decimal,
+        rawTime: times,
+        ...calcDataLine(datas, yestclose),
+        source: {
+          time: xAxisTimes,
+          data: datas,
+          ma5: calcMA(datas, 5, decimal),
         },
-    },
-    setup(props, { emit }) {
-        const loading = ref(false);
-        const isEmpty = ref(false);
-        const historyIndexs: number[] = []; // 行情历史数据中所有非补充数据的索引位置(用于计算均线)
-        const { chartData, options, updateOptions, initOptions } = handleEchart();
-
-        // 处理图表数据
-        const handleData = (rawData: QueryTSDataRsp): void => {
-            historyIndexs.length = 0; // 清空数据
-            const datas: number[] = [],
-                times: string[] = [],
-                xAxisTimes: string[] = [],
-                yestclose = rawData.preSettle,
-                decimal = rawData.decimalPlace;
-
-            // 历史行情日期
-            rawData.historyDatas.forEach((item, index) => {
-                const { c, ts } = item;
-                datas.push(c);
-                times.push(moment(ts).format('YYYY-MM-DD HH:mm:ss'));
-                if (!item.f) historyIndexs.push(index);
-            });
-
-            // 时间轴(开盘交易时间)
-            rawData.runSteps.forEach((item) => {
-                const { start, end } = item;
-                const rangeTime = getRangeTime(start, end, 'HH:mm', 'm');
-                xAxisTimes.push(...rangeTime);
-            });
-
-            chartData.value = {
-                yestclose,
-                decimal,
-                rawTime: times,
-                ...calcDataLine(datas, yestclose),
-                source: {
-                    time: xAxisTimes,
-                    data: datas,
-                    ma5: calcMA(datas, 5, decimal),
-                },
-            };
-        };
-
-        // 计算图表最高低指标线
-        const calcDataLine = (datas: number[], yestclose: number) => {
-            let max = Math.max(...datas); // 取历史行情最高价
-            let min = Math.min(...datas); // 取历史行情最低价
-
-            const last = datas[datas.length - 1], // 历史行情最后收盘价
-                a = yestclose - min, // 计算收盘价和最低价的差值
-                b = max - yestclose; // 计算收盘价和最高价的差值
-
-            // 比较差值大小
-            if (a > b) {
-                max = yestclose + a;
-                if (last > max) {
-                    const c = last - max;
-                    max += c;
-                    min -= c;
-                }
-            } else {
-                min = min - (b - a);
-                if (min > last) {
-                    const c = min - last;
-                    max += c;
-                    min -= c;
-                }
-            }
-
-            return {
-                max: max + max * 0.01,
-                min: min - min * 0.01,
-            };
-        };
-
-        // 计算平均线
-        const calcMA = (data: number[], count: number, decimal: number) => {
-            const result: string[] = [];
-            if (data.length >= count) {
-                // 均线起始位置
-                const startIndex = historyIndexs[count - 1];
-                for (let i = 0; i < data.length; i++) {
-                    if (startIndex === undefined || i < startIndex) {
-                        result.push('-');
-                    } else {
-                        const j = historyIndexs.findIndex((val) => val === i);
-                        // 判断是否补充数据
-                        if (j === -1) {
-                            // 取上个平均值
-                            result.push(result[result.length - 1]);
-                        } else {
-                            // 向后取MA数
-                            const maIndexs = historyIndexs.slice(j - (count - 1), j + 1);
-                            // 计算总价
-                            const total = maIndexs.reduce((sum, val) => sum + data[val], 0);
-                            // 计算均线
-                            const ma = toDecimalFull(total / count, decimal);
-                            result.push(ma);
-                        }
-                    }
-                }
-            }
-            return result;
-        };
-
-        // 更新分时数据
-        const updateChartData = () => {
-            const { source, rawTime } = chartData.value,
-                lastIndex = source.data.length - 1, // 历史行情最后索引位置
-                lastTime = moment(rawTime[rawTime.length - 1]), // 历史行情最后时间
-                newTime = moment(props.quoteData.lasttime), // 实时行情最新时间
-                newPrice = props.quoteData.last; // 实时行情最新价
-
-            const cycleMilliseconds = 60 * 1000; // 周期毫秒数
-
-            const diffTime = newTime.valueOf() - lastTime.valueOf(); // 计算时间差
-            // 判断时间差是否大于周期时间
-            if (diffTime > cycleMilliseconds) {
-                lastTime.add(cycleMilliseconds, 'ms');
-                rawTime.push(lastTime.format('YYYY-MM-DD HH:mm:ss')); // 添加历史行情时间
-                source.data.push(newPrice); // 添加历史行情数据
-                historyIndexs.push(lastIndex + 1); // 添加历史行情索引
+      };
+    };
+
+    // 计算图表最高低指标线
+    const calcDataLine = (datas: number[], yestclose: number) => {
+      let max = Math.max(...datas); // 取历史行情最高价
+      let min = Math.min(...datas); // 取历史行情最低价
+
+      const last = datas[datas.length - 1], // 历史行情最后收盘价
+        a = yestclose - min, // 计算收盘价和最低价的差值
+        b = max - yestclose; // 计算收盘价和最高价的差值
+
+      // 比较差值大小
+      if (a > b) {
+        max = yestclose + a;
+        if (last > max) {
+          const c = last - max;
+          max += c;
+          min -= c;
+        }
+      } else {
+        min = min - (b - a);
+        if (min > last) {
+          const c = min - last;
+          max += c;
+          min -= c;
+        }
+      }
+
+      return {
+        max: max + max * 0.01,
+        min: min - min * 0.01,
+      };
+    };
+
+    // 计算平均线
+    const calcMA = (data: number[], count: number, decimal: number) => {
+      const result: string[] = [];
+      if (data.length >= count) {
+        // 均线起始位置
+        const startIndex = historyIndexs[count - 1];
+        for (let i = 0; i < data.length; i++) {
+          if (startIndex === undefined || i < startIndex) {
+            result.push('-');
+          } else {
+            const j = historyIndexs.findIndex((val) => val === i);
+            // 判断是否补充数据
+            if (j === -1) {
+              // 取上个平均值
+              result.push(result[result.length - 1]);
             } else {
-                source.data[lastIndex] = newPrice; // 更新历史行情数据
+              // 向后取MA数
+              const maIndexs = historyIndexs.slice(j - (count - 1), j + 1);
+              // 计算总价
+              const total = maIndexs.reduce((sum, val) => sum + data[val], 0);
+              // 计算均线
+              const ma = toDecimalFull(total / count, decimal);
+              result.push(ma);
             }
-
-            source.ma5 = calcMA(source.data, 5, chartData.value.decimal);
-
-            const { min, max } = calcDataLine(source.data, chartData.value.yestclose);
-            chartData.value.min = min;
-            chartData.value.max = max;
-
-            // 延迟图表更新,减少卡顿
-            debounce(() => {
-                updateOptions();
-            }, 1000);
-        };
-
-        onMounted(() => {
-            loading.value = true;
-            // 查询分时数据
-            QueryTSData(props.quoteData.goodscode)
-                .then((res) => {
-                    if (res.historyDatas.length) {
-                        isEmpty.value = false;
-                        handleData(res);
-                        // 调用父级函数查询tik数据 (不合理的逻辑处理,待优化)
-                        emit('change', res.startTime, res.endTime);
-                    } else {
-                        isEmpty.value = true;
-                    }
-                    initOptions();
-                })
-                .catch(() => {
-                    isEmpty.value = true;
-                })
-                .finally(() => {
-                    loading.value = false;
-                });
+          }
+        }
+      }
+      return result;
+    };
+
+    // 更新分时数据
+    const updateChartData = () => {
+      const { source, rawTime } = chartData.value,
+        lastIndex = source.data.length - 1, // 历史行情最后索引位置
+        lastTime = moment(rawTime[rawTime.length - 1]), // 历史行情最后时间
+        newTime = moment(props.quoteData.lasttime), // 实时行情最新时间
+        newPrice = props.quoteData.last; // 实时行情最新价
+
+      const cycleMilliseconds = 60 * 1000; // 周期毫秒数
+
+      const diffTime = newTime.valueOf() - lastTime.valueOf(); // 计算时间差
+      // 判断时间差是否大于周期时间
+      if (diffTime > cycleMilliseconds) {
+        lastTime.add(cycleMilliseconds, 'ms');
+        rawTime.push(lastTime.format('YYYY-MM-DD HH:mm:ss')); // 添加历史行情时间
+        source.data.push(newPrice); // 添加历史行情数据
+        historyIndexs.push(lastIndex + 1); // 添加历史行情索引
+      } else {
+        source.data[lastIndex] = newPrice; // 更新历史行情数据
+      }
+
+      source.ma5 = calcMA(source.data, 5, chartData.value.decimal);
+
+      const { min, max } = calcDataLine(source.data, chartData.value.yestclose);
+      chartData.value.min = min;
+      chartData.value.max = max;
+
+      // 延迟图表更新,减少卡顿
+      debounce(() => {
+        updateOptions();
+      }, 1000);
+    };
+
+    onMounted(() => {
+      loading.value = true;
+      // 查询分时数据
+      QueryTSData(props.quoteData.goodscode)
+        .then((res) => {
+          if (res.historyDatas.length) {
+            isEmpty.value = false;
+            handleData(res);
+            // 调用父级函数查询tik数据 (不合理的逻辑处理,待优化)
+            emit('change', res.startTime, res.endTime);
+          } else {
+            isEmpty.value = true;
+          }
+          initOptions();
+        })
+        .catch(() => {
+          isEmpty.value = true;
+        })
+        .finally(() => {
+          loading.value = false;
         });
-
-        watch(
-            () => props.quoteData.last,
-            () => {
-                if (!loading.value) {
-                    updateChartData();
-                }
-            }
-        );
-
-        return {
-            loading,
-            isEmpty,
-            options,
-        };
-    },
+    });
+
+    watch(
+      () => props.quoteData.last,
+      () => {
+        if (!loading.value) {
+          updateChartData();
+        }
+      }
+    );
+
+    return {
+      loading,
+      isEmpty,
+      options,
+    };
+  },
 });
 </script>

+ 53 - 79
src/views/business/purchase/components/invoice/index.vue

@@ -1,20 +1,10 @@
 <template>
   <!-- 发票登记-->
-  <a-modal class="commonModal paddingDialog invoice"
-           :title="selectedRow.contracttype===1? '采购合同-发票登记': '销售合同-发票登记'"
-           v-model:visible="visible"
-           centered
-           @cancel="cancel"
-           width="890px">
+  <a-modal class="commonModal paddingDialog invoice" :title="selectedRow.contracttype===1? '采购合同-发票登记': '销售合同-发票登记'" v-model:visible="visible" centered @cancel="cancel" width="890px">
     <template #footer>
-      <a-button key="submit"
-                class="cancelBtn"
-                @click="cancel">取消
+      <a-button key="submit" class="cancelBtn" @click="cancel">取消
       </a-button>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="submit">发票登记
+      <a-button key="submit" type="primary" :loading="loading" @click="submit">发票登记
       </a-button>
     </template>
     <fieldset class="formFieldSet">
@@ -52,20 +42,17 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="贷款总额">
-              <span
-                    class="white">{{ formatValue(selectedRow.loanamount) + " 元" }}</span>
+              <span class="white">{{ formatValue(selectedRow.loanamount) + " 元" }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
             <a-form-item label="保证金">
-              <span
-                    class="white">{{ formatValue(selectedRow.margin)+ " 元" }}</span>
+              <span class="white">{{ formatValue(selectedRow.margin)+ " 元" }}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
             <a-form-item label="其他费用">
-              <span
-                    class="white">{{ selectedRow.reckonotheramount + " 元"}}</span>
+              <span class="white">{{ selectedRow.reckonotheramount + " 元"}}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">
@@ -85,8 +72,7 @@
           </a-col>
           <a-col :span="24">
             <a-form-item label="预收票额">
-              <span
-                    class="white">{{ selectedRow.preinvoiceamount + " 元" }}</span>
+              <span class="white">{{ selectedRow.preinvoiceamount + " 元" }}</span>
             </a-form-item>
           </a-col>
         </a-row>
@@ -94,21 +80,11 @@
     </fieldset>
     <fieldset class="formFieldSet">
       <legend>本次发票信息</legend>
-      <a-form class="inlineForm"
-              ref="formRef"
-              :model="formState"
-              :rules="rules">
+      <a-form class="inlineForm" ref="formRef" :model="formState" :rules="rules">
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="收票金额"
-                         class="relative mb40"
-                         name="InvoiceAmount">
-              <a-input-number v-model:value="formState.InvoiceAmount"
-                              class="dialogInput"
-                              style="width: 200px"
-                              :min="0"
-                              suffix="元"
-                              placeholder="请输入收票金额" />
+            <a-form-item label="收票金额" class="relative mb40" name="InvoiceAmount">
+              <a-input-number v-model:value="formState.InvoiceAmount" class="dialogInput" style="width: 200px" :min="0" suffix="元" placeholder="请输入收票金额" />
               <div class="tip">
                 <div>应收票额:{{ selectedRow.daikaiamount + " 元" }} </div>
                 <div><a class="blue fr">全部登记</a></div>
@@ -116,10 +92,8 @@
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="发票附件"
-                         class="mb40">
-              <UploadImg :visible="visible"
-                         @upload="uploadImgAction" />
+            <a-form-item label="发票附件" class="mb40">
+              <UploadImg :visible="visible" @upload="uploadImgAction" />
             </a-form-item>
           </a-col>
         </a-row>
@@ -141,49 +115,49 @@ import UploadImg from '@/common/components/uploadImg/index.vue';
 import { getUploadImg } from '@/common/setup/upload';
 
 export default defineComponent({
-    name: 'purchase_pending_invoice',
-    components: { UploadImg },
-    emits: ['cancel', 'update'],
-    props: {
-        selectedRow: {
-            type: Object as PropType<Ermcp3SellBuyContract>,
-            default: {},
-        },
+  name: 'purchase_pending_invoice',
+  components: { UploadImg },
+  emits: ['cancel', 'update'],
+  props: {
+    selectedRow: {
+      type: Object as PropType<Ermcp3SellBuyContract>,
+      default: {},
     },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        const { getFirstImg, uploadImgAction } = getUploadImg();
-        const loading = ref<boolean>(false);
-        const { rules, formState, formRef } = handleForm();
-        function submit() {
-            const wrapEl = unref(formRef);
-            wrapEl.validate().then(() => {
-                loading.value = true;
-                const params: InvoiceReq = {
-                    InvoiceAmount: formState.InvoiceAmount!,
-                };
-                // 发出发票登记
-                invoiceReq(props.selectedRow.spotcontractid, params, loading, getFirstImg())
-                    .then(() => {
-                        cancel(true);
-                    })
-                    .catch((err) => {});
-            });
-        }
-
-        return {
-            visible,
-            cancel,
-            submit,
-            loading,
-            formRef,
-            formState,
-            formatValue,
-            rules,
-            getPriceTypeName,
-            uploadImgAction,
+  },
+  setup(props, context) {
+    const { visible, cancel } = _closeModal(context);
+    const { getFirstImg, uploadImgAction } = getUploadImg();
+    const loading = ref<boolean>(false);
+    const { rules, formState, formRef } = handleForm();
+    function submit() {
+      const wrapEl = unref(formRef);
+      wrapEl.validate().then(() => {
+        loading.value = true;
+        const params: InvoiceReq = {
+          InvoiceAmount: formState.InvoiceAmount!,
         };
-    },
+        // 发出发票登记
+        invoiceReq(props.selectedRow.spotcontractid, params, loading, getFirstImg())
+          .then(() => {
+            cancel(true);
+          })
+          .catch((err) => { });
+      });
+    }
+
+    return {
+      visible,
+      cancel,
+      submit,
+      loading,
+      formRef,
+      formState,
+      formatValue,
+      rules,
+      getPriceTypeName,
+      uploadImgAction,
+    };
+  },
 });
 </script>
 

+ 1 - 1
src/views/business/purchase/components/invoice/setup.ts

@@ -12,7 +12,7 @@ export function handleForm() {
         InvoiceAmount: null,
     })
     const rules = {
-         InvoiceAmount: [{ required: true, message: '请输入收票金额', trigger: 'blur', type: 'number' }],
+        InvoiceAmount: [{ required: true, message: '', trigger: 'blur', type: 'number' }],
     }
     return { rules, formState, formRef }
 }

+ 136 - 136
src/views/business/purchase/components/storage/index.vue

@@ -1,45 +1,45 @@
 <template>
-    <!-- 采购合同-入库登记-->
-    <a-modal class="commonModal" title="采购合同-入库登记" v-model:visible="visible" centered @cancel="cancel" width="890px">
-        <template #footer>
-            <a-button key="submit" class="cancelBtn" @click="cancel">取消</a-button>
-            <a-button key="submit" type="primary" :loading="loading" @click="submit">入库登记</a-button>
-        </template>
-        <a-form class="inlineForm" ref="formRef" :model="formState" :rules="rules">
-            <fieldset class="formFieldSet">
-                <legend>合同基本信息</legend>
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="合同编号">
-                            <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item :label="selectedRow.contracttype === 1 ? '采购方' : '销售方'">
-                            <span class="white">{{ formatValue(selectedRow.accountname) }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="现货品种">
-                            <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="合同签署量">
-                            <span class="white">{{ formatValue(selectedRow.qty) }}</span>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </fieldset>
-            <fieldset class="formFieldSet">
-                <legend>已登记信息</legend>
-                <a-row :gutter="24">
-                    <a-col :span="12" v-for="(item, i) in DGList" :key="i">
-                        <a-form-item label="已入库量">
-                            <span class="white">{{ item.wrstandardname }} + {{ item.brandname }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <!-- <a-col :span="12">
+  <!-- 采购合同-入库登记-->
+  <a-modal class="commonModal" title="采购合同-入库登记" v-model:visible="visible" centered @cancel="cancel" width="890px">
+    <template #footer>
+      <a-button key="submit" class="cancelBtn" @click="cancel">取消</a-button>
+      <a-button key="submit" type="primary" :loading="loading" @click="submit">入库登记</a-button>
+    </template>
+    <a-form class="inlineForm" ref="formRef" :model="formState" :rules="rules">
+      <fieldset class="formFieldSet">
+        <legend>合同基本信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="合同编号">
+              <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item :label="selectedRow.contracttype === 1 ? '采购方' : '销售方'">
+              <span class="white">{{ formatValue(selectedRow.accountname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="现货品种">
+              <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="合同签署量">
+              <span class="white">{{ formatValue(selectedRow.qty) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>已登记信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12" v-for="(item, i) in DGList" :key="i">
+            <a-form-item label="已入库量">
+              <span class="white">{{item.wrstandardname}} + {{item.brandname}} ({{item.totalqty + selectedRow.enumdicname}})</span>
+            </a-form-item>
+          </a-col>
+          <!-- <a-col :span="12">
             <a-form-item label="已入库量2">
               <span class="white">品类2+品牌2(66吨)</span>
             </a-form-item>
@@ -54,41 +54,41 @@
               <span class="white">品类4+品牌4(5吨)</span>
             </a-form-item>
           </a-col> -->
-                </a-row>
-            </fieldset>
-            <fieldset class="formFieldSet">
-                <legend>本次入库信息</legend>
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="商品">
-                            <a-select class="inlineFormSelect" style="width: 200px" placeholder="请选择品类" v-model:value="selectedRow.wrstandardid" readonly>
-                                <a-select-option v-for="option in gmlist" :key="option.wrstandardid" :value="option.wrstandardid">{{ option.wrstandardname }} </a-select-option>
-                            </a-select>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="品牌" name="SpotGoodsBrandID">
-                            <a-select class="inlineFormSelect" style="width: 200px" placeholder="请选择品牌" v-model:value="formState.SpotGoodsBrandID">
-                                <a-select-option v-for="option in gblist" :key="option.brandid" :value="option.brandid">{{ option.brandname }}</a-select-option>
-                            </a-select>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="入库仓库" name="WarehouseInfo">
-                            <a-select class="inlineFormSelect" style="width: 200px" placeholder="请选择入库仓库" v-model:value="formState.WarehouseInfo">
-                                <a-select-option v-for="option in wareHouseList" :key="option.autoid" :value="option.autoid">{{ option.warehousecode }}</a-select-option>
-                            </a-select>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="入库数量" name="Qty">
-                            <a-input-number class="dialogInput" style="width: 200px" suffix="单位" :min="0" placeholder="请输入入库数量" v-model:value="formState.Qty"> </a-input-number>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </fieldset>
-        </a-form>
-    </a-modal>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>本次入库信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="商品">
+              <a-select class="inlineFormSelect" style="width: 200px" placeholder="请选择品类" v-model:value="selectedRow.wrstandardid" readonly>
+                <a-select-option v-for="option in gmlist" :key="option.wrstandardid" :value="option.wrstandardid">{{ option.wrstandardname }} </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="品牌" name="SpotGoodsBrandID">
+              <a-select class="inlineFormSelect" style="width: 200px" placeholder="请选择品牌" v-model:value="formState.SpotGoodsBrandID">
+                <a-select-option v-for="option in gblist" :key="option.brandid" :value="option.brandid">{{ option.brandname }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="入库仓库" name="WarehouseInfo">
+              <a-select class="inlineFormSelect" style="width: 200px" placeholder="请选择入库仓库" v-model:value="formState.WarehouseInfo">
+                <a-select-option v-for="option in wareHouseList" :key="option.autoid" :value="option.autoid">{{ option.warehousecode }}</a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="入库数量" name="Qty">
+              <a-input-number class="dialogInput" style="width: 200px" suffix="单位" :min="0" placeholder="请输入入库数量" v-model:value="formState.Qty"> </a-input-number>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+    </a-form>
+  </a-modal>
 </template>
 
 <script lang="ts">
@@ -108,70 +108,70 @@ import { ermcpInOutStockApplyReq } from '@/services/proto/warehouse';
 import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
-    name: 'purchase_pending_storage',
-    emits: ['cancel', 'update'],
-    components: {},
-    props: {
-        selectedRow: {
-            type: Object as PropType<Ermcp3SellBuyContract>,
-            default: {},
-        },
+  name: 'purchase_pending_storage',
+  emits: ['cancel', 'update'],
+  components: {},
+  props: {
+    selectedRow: {
+      type: Object as PropType<Ermcp3SellBuyContract>,
+      default: {},
     },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        const { rules, formState, formRef } = handleForm();
-        const loading = ref<boolean>(false);
-        const wareHouseList = ref<ErmcpWareHouseInfo[]>([]);
-        const gblist = ref<[]>([]);
-        const gmlist = ref<[]>([]);
-        const DGList = ref<Ermcp3AreaStockApplySum[]>([]);
+  },
+  setup(props, context) {
+    const { visible, cancel } = _closeModal(context);
+    const { rules, formState, formRef } = handleForm();
+    const loading = ref<boolean>(false);
+    const wareHouseList = ref<ErmcpWareHouseInfo[]>([]);
+    const gblist = ref<[]>([]);
+    const gmlist = ref<[]>([]);
+    const DGList = ref<Ermcp3AreaStockApplySum[]>([]);
 
-        QueryAreaStockApply(props.selectedRow.spotcontractid)
-            .then((res) => {
-                DGList.value = res.filter((e) => e.inouttype === 1);
-            })
-            .catch((err) => message.error(err));
-        const deliverygoods = APP.get('DeliveryGoodsList').find((x: any) => x.data.deliverygoodsid === props.selectedRow.deliverygoodsid);
-        gblist.value = deliverygoods && deliverygoods.gblist;
-        gmlist.value = deliverygoods && deliverygoods.gmlist;
-        // 查询仓库信息
-        QueryWareHouse('1').then((res) => {
-            wareHouseList.value = res;
-        });
+    QueryAreaStockApply(props.selectedRow.spotcontractid)
+      .then((res) => {
+        DGList.value = res.filter((e) => e.inouttype === 5);
+      })
+      .catch((err) => message.error(err));
+    const deliverygoods = APP.get('DeliveryGoodsList').find((x: any) => x.data.deliverygoodsid === props.selectedRow.deliverygoodsid);
+    gblist.value = deliverygoods && deliverygoods.gblist;
+    gmlist.value = deliverygoods && deliverygoods.gmlist;
+    // 查询仓库信息
+    QueryWareHouse('1').then((res) => {
+      wareHouseList.value = res;
+    });
 
-        function submit() {
-            const wrapEl = unref(formRef);
-            wrapEl.validate().then(() => {
-                const params: ERMCPAreaInOutStockApplyReq = {
-                    InOutType: 5, //  5:采购入库 6:销售出库 7:生产入库 8:生产出库
-                    WRStandardID: props.selectedRow.wrstandardid, //品类ID
-                    SpotGoodsBrandID: formState.SpotGoodsBrandID || 0, //现货品牌ID(DGFactoryItem表的ID)
-                    DeliveryGoodsID: props.selectedRow.deliverygoodsid, //现货商品ID
-                    SpotContractID: Long.fromString(props.selectedRow.spotcontractid), //合同ID
-                    WarehouseInfo: formState.WarehouseInfo || 0, // uint64 现货仓库ID
-                    Qty: formState.Qty || 0, // double 数量t
-                    ApplyRemark: '', // string 申请备注
-                };
-                requestResultLoadingAndInfo(ermcpInOutStockApplyReq, params, loading, ['入库登记成功', '入库登记失败:']).then(() => {
-                    cancel(true);
-                });
-            });
-        }
-        return {
-            visible,
-            cancel,
-            submit,
-            loading,
-            formatValue,
-            rules,
-            formState,
-            formRef,
-            wareHouseList,
-            gblist,
-            gmlist,
-            DGList,
+    function submit() {
+      const wrapEl = unref(formRef);
+      wrapEl.validate().then(() => {
+        const params: ERMCPAreaInOutStockApplyReq = {
+          InOutType: 5, //  5:采购入库 6:销售出库 7:生产入库 8:生产出库
+          WRStandardID: props.selectedRow.wrstandardid, //品类ID
+          SpotGoodsBrandID: formState.SpotGoodsBrandID || 0, //现货品牌ID(DGFactoryItem表的ID)
+          DeliveryGoodsID: props.selectedRow.deliverygoodsid, //现货商品ID
+          SpotContractID: Long.fromString(props.selectedRow.spotcontractid), //合同ID
+          WarehouseInfo: formState.WarehouseInfo || 0, // uint64 现货仓库ID
+          Qty: formState.Qty || 0, // double 数量t
+          ApplyRemark: '', // string 申请备注
         };
-    },
+        requestResultLoadingAndInfo(ermcpInOutStockApplyReq, params, loading, ['入库登记成功', '入库登记失败:']).then(() => {
+          cancel(true);
+        });
+      });
+    }
+    return {
+      visible,
+      cancel,
+      submit,
+      loading,
+      formatValue,
+      rules,
+      formState,
+      formRef,
+      wareHouseList,
+      gblist,
+      gmlist,
+      DGList,
+    };
+  },
 });
 </script>
 

+ 48 - 38
src/views/business/search/plan/index.vue

@@ -1,14 +1,14 @@
 <template>
-    <!-- 现货查询: 购销计划-->
-    <div class="search-plan" :loading="loading">
-        <filterCustomTable @search="updateColumn"></filterCustomTable>
-        <a-table :columns="columns" class="srcollYTable" :pagination="false" rowKey="key" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
-            <template #index="{ index }">
-                <span>{{ index + 1 }}</span>
-            </template>
-        </a-table>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-    </div>
+  <!-- 现货查询: 购销计划-->
+  <div class="search-plan" :loading="loading">
+    <filterCustomTable @search="updateColumn"></filterCustomTable>
+    <a-table :columns="columns" class="srcollYTable" :pagination="false" rowKey="key" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
+      <template #index="{ index }">
+        <span>{{ index + 1 }}</span>
+      </template>
+    </a-table>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </div>
 </template>
 
 <script lang="ts">
@@ -19,38 +19,48 @@ import { columns } from './setup';
 import { Ermcp3HedgePlan } from '@/services/go/ermcp/plan/interface';
 import { QueryHedgePlan } from '@/services/go/ermcp/plan';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
+import moment from 'moment';
 
 export default defineComponent({
-    name: 'search-plan',
-    components: {
-        filterCustomTable,
-        MtpTableButton,
-    },
-    setup() {
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<Ermcp3HedgePlan>();
+  name: 'search-plan',
+  components: {
+    filterCustomTable,
+    MtpTableButton,
+  },
+  setup() {
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Ermcp3HedgePlan>();
 
-        // 获取列表数据
-        const queryTableAction = () => queryTable(QueryHedgePlan, '2,3');
+    // 获取列表数据
+    const queryTableAction = () => queryTable(QueryHedgePlan, '2,3').then((res) => {
+      // 执行中在上面, 完结的排在下面, 执行中的, 按照单号或者时间,进行倒序排列
+      tableList.value = []
+      tableList.value = res.sort((a, b) => {
+        if (a.hedgeplanstatus !== b.hedgeplanstatus) {
+          return a.hedgeplanstatus - b.hedgeplanstatus
+        }
+        return moment(b.createtime).valueOf() - moment(a.createtime).valueOf()
+      })
+    });
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.spot_contract_checkpending,
-            tableName: 'table_pcweb_hedging_plan',
-            tableFilterKey: ['contracttype', 'hedgeplanno', 'deliverygoodsname'],
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.spot_contract_checkpending,
+      tableName: 'table_pcweb_hedging_plan',
+      tableFilterKey: ['contracttype', 'hedgeplanno', 'deliverygoodsname'],
+      isDetail: true,
+    };
 
-        return {
-            ...handleComposeTable<Ermcp3HedgePlan>(param),
-            loading,
-            tableList,
-            queryTable,
-            formatTime,
-            formatValue,
-            columns,
-        };
-    },
+    return {
+      ...handleComposeTable<Ermcp3HedgePlan>(param),
+      loading,
+      tableList,
+      queryTable,
+      formatTime,
+      formatValue,
+      columns,
+    };
+  },
 });
 </script>

+ 63 - 57
src/views/business/search/spot/index.vue

@@ -1,14 +1,14 @@
 <template>
-    <!-- 现货查询: 采购合同-销售合同-->
-    <div class="spot-contract-search" :loading="loading">
-        <filterCustomTable @search="updateColumn"></filterCustomTable>
-        <a-table :columns="columns" class="srcollYTable" :pagination="false" rowKey="key" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
-            <template #index="{ index }">
-                <span>{{ index + 1 }}</span>
-            </template>
-        </a-table>
-        <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
-    </div>
+  <!-- 现货查询: 采购合同-销售合同-->
+  <div class="spot-contract-search" :loading="loading">
+    <filterCustomTable @search="updateColumn"></filterCustomTable>
+    <a-table :columns="columns" class="srcollYTable" :pagination="false" rowKey="key" :expandedRowKeys="expandedRowKeys" :customRow="Rowclick" :data-source="tableList" :scroll="{ x: 'calc(100% - 160px)', y: 'calc(100vh - 163px)' }">
+      <template #index="{ index }">
+        <span>{{ index + 1 }}</span>
+      </template>
+    </a-table>
+    <component :is="componentId" v-if="componentId" :selectedRow="selectedRow" @cancel="closeComponent"></component>
+  </div>
 </template>
 
 <script lang="ts">
@@ -23,55 +23,61 @@ import { useRoute } from 'vue-router';
 import moment from 'moment';
 
 export default defineComponent({
-    name: 'spot-contract-search',
-    components: {
-        filterCustomTable,
-        MtpTableButton,
-    },
-    setup() {
-        const { name: routeName } = useRoute();
-        // 表格列表数据
-        const { loading, tableList, queryTable } = queryTableList<Ermcp3ContractRsp>();
+  name: 'spot-contract-search',
+  components: {
+    filterCustomTable,
+    MtpTableButton,
+  },
+  setup() {
+    const { name: routeName } = useRoute();
+    // 表格列表数据
+    const { loading, tableList, queryTable } = queryTableList<Ermcp3ContractRsp>();
 
-        // 获取列表数据
-        const queryTableAction = () => {
-            switch (routeName) {
-                case 'search_purchase':
-                    queryTable(QuerySpotContract, { contracttype: 1, querytype: '3,4' }).then(res => {
-                        // FIXME: - 这里有覆盖先后顺序的问题
-                        tableList.value = []
-                        tableList.value = res.sort((a,b) => {
-                            if (a.contracctstatus !== b.contracctstatus) {
-                                return a.contracctstatus - b.contracctstatus
-                            }
-                            return moment(b.createtime).valueOf() - moment(a.createtime).valueOf()
-                        })
-                    });
-                    break;
-                case 'search_sell':
-                    queryTable(QuerySpotContract, { contracttype: -1, querytype: '3,4' });
-                    break;
-            }
-        };
+    // 获取列表数据
+    const queryTableAction = () => {
+      // 执行中在上面, 完结的排在下面, 执行中的, 按照单号或者时间,进行倒序排列
+      const tableSort = (data: Ermcp3ContractRsp[]) => {
+        // FIXME: - 这里有覆盖先后顺序的问题
+        tableList.value = []
+        tableList.value = data.sort((a, b) => {
+          if (a.contracctstatus !== b.contracctstatus) {
+            return a.contracctstatus - b.contracctstatus
+          }
+          return moment(b.createtime).valueOf() - moment(a.createtime).valueOf()
+        })
+      }
+      switch (routeName) {
+        case 'search_purchase':
+          queryTable(QuerySpotContract, { contracttype: 1, querytype: '3,4' }).then(res => {
+            tableSort(res);
+          });
+          break;
+        case 'search_sell':
+          queryTable(QuerySpotContract, { contracttype: -1, querytype: '3,4' }).then(res => {
+            tableSort(res);
+          });
+          break;
+      }
+    };
 
-        // 表格通用逻辑
-        const param: ComposeTableParam = {
-            queryFn: queryTableAction,
-            menuType: EnumRouterName.spot_contract_checkpending,
-            tableName: 'table_pcweb_delivery',
-            tableFilterKey: ['contracttype', 'pricetype', 'contractno'],
-            isDetail: true,
-        };
+    // 表格通用逻辑
+    const param: ComposeTableParam = {
+      queryFn: queryTableAction,
+      menuType: EnumRouterName.spot_contract_checkpending,
+      tableName: 'table_pcweb_delivery',
+      tableFilterKey: ['contracttype', 'pricetype', 'contractno'],
+      isDetail: true,
+    };
 
-        return {
-            ...handleComposeTable<Ermcp3ContractRsp>(param),
-            loading,
-            tableList,
-            queryTable,
-            formatTime,
-            formatValue,
-            columns,
-        };
-    },
+    return {
+      ...handleComposeTable<Ermcp3ContractRsp>(param),
+      loading,
+      tableList,
+      queryTable,
+      formatTime,
+      formatValue,
+      columns,
+    };
+  },
 });
 </script>

+ 52 - 74
src/views/business/sell/components/invoice/index.vue

@@ -1,20 +1,10 @@
 <template>
   <!-- 发票登记-->
-  <a-modal class="commonModal paddingDialog invoice"
-           :title="selectedRow.contracttype===1? '采购合同-发票登记': '销售合同-发票登记'"
-           v-model:visible="visible"
-           centered
-           @cancel="cancel"
-           width="890px">
+  <a-modal class="commonModal paddingDialog invoice" :title="selectedRow.contracttype===1? '采购合同-发票登记': '销售合同-发票登记'" v-model:visible="visible" centered @cancel="cancel" width="890px">
     <template #footer>
-      <a-button key="submit"
-                class="cancelBtn"
-                @click="cancel">取消
+      <a-button key="submit" class="cancelBtn" @click="cancel">取消
       </a-button>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="submit">发票登记
+      <a-button key="submit" type="primary" :loading="loading" @click="submit">发票登记
       </a-button>
     </template>
     <fieldset class="formFieldSet">
@@ -90,21 +80,11 @@
     </fieldset>
     <fieldset class="formFieldSet">
       <legend>本次发票信息</legend>
-      <a-form class="inlineForm"
-              ref="formRef"
-              :model="formState"
-              :rules="rules">
+      <a-form class="inlineForm" ref="formRef" :model="formState" :rules="rules">
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item label="收票金额"
-                         class="relative mb40"
-                         name="InvoiceAmount">
-              <a-input-number v-model:value="formState.InvoiceAmount"
-                              class="dialogInput"
-                              style="width: 200px"
-                              suffix="元"
-                              :min="0"
-                              placeholder="请输入收票金额" />
+            <a-form-item label="开票金额" class="relative mb40" name="InvoiceAmount">
+              <a-input-number v-model:value="formState.InvoiceAmount" class="dialogInput" style="width: 200px" suffix="元" :min="0" placeholder="请输入开票金额" />
               <div class="tip">
                 <div>应开票额:{{ selectedRow.daikaiamount + " 元" }}
                   {{ handleCurrencyname(selectedRow.currencyname) }}</div>
@@ -113,10 +93,8 @@
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="发票附件"
-                         class="mb40">
-              <UploadImg :visible="visible"
-                         @upload="uploadImgAction" />
+            <a-form-item label="发票附件" class="mb40">
+              <UploadImg :visible="visible" @upload="uploadImgAction" />
             </a-form-item>
           </a-col>
         </a-row>
@@ -138,52 +116,52 @@ import UploadImg from '@/common/components/uploadImg/index.vue';
 import { getUploadImg } from '@/common/setup/upload';
 
 export default defineComponent({
-    name: 'sell_pending_invoice',
-    emits: ['cancel', 'update'],
-    components: { UploadImg },
-    props: {
-        selectedRow: {
-            type: Object as PropType<Ermcp3SellBuyContract>,
-            default: {},
-        },
+  name: 'sell_pending_invoice',
+  emits: ['cancel', 'update'],
+  components: { UploadImg },
+  props: {
+    selectedRow: {
+      type: Object as PropType<Ermcp3SellBuyContract>,
+      default: {},
     },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        const loading = ref<boolean>(false);
-        const { rules, formState, formRef } = handleForm();
-        const { getFirstImg, uploadImgAction } = getUploadImg();
-        function submit() {
-            const wrapEl = unref(formRef);
-            wrapEl.validate().then(() => {
-                loading.value = true;
-                const params: InvoiceReq = {
-                    InvoiceAmount: formState.InvoiceAmount!,
-                };
-                // 发出发票登记
-                invoiceReq(props.selectedRow.spotcontractid, params, loading, getFirstImg())
-                    .then(() => {
-                        cancel(true);
-                    })
-                    .catch((err) => {});
-            });
-        }
-        function handleCurrencyname(currencyname: string) {
-            return currencyname === '人民币' ? '' : currencyname;
-        }
-        return {
-            visible,
-            cancel,
-            submit,
-            loading,
-            formRef,
-            formState,
-            formatValue,
-            rules,
-            getPriceTypeName,
-            handleCurrencyname,
-            uploadImgAction,
+  },
+  setup(props, context) {
+    const { visible, cancel } = _closeModal(context);
+    const loading = ref<boolean>(false);
+    const { rules, formState, formRef } = handleForm();
+    const { getFirstImg, uploadImgAction } = getUploadImg();
+    function submit() {
+      const wrapEl = unref(formRef);
+      wrapEl.validate().then(() => {
+        loading.value = true;
+        const params: InvoiceReq = {
+          InvoiceAmount: formState.InvoiceAmount!,
         };
-    },
+        // 发出发票登记
+        invoiceReq(props.selectedRow.spotcontractid, params, loading, getFirstImg())
+          .then(() => {
+            cancel(true);
+          })
+          .catch((err) => { });
+      });
+    }
+    function handleCurrencyname(currencyname: string) {
+      return currencyname === '人民币' ? '' : currencyname;
+    }
+    return {
+      visible,
+      cancel,
+      submit,
+      loading,
+      formRef,
+      formState,
+      formatValue,
+      rules,
+      getPriceTypeName,
+      handleCurrencyname,
+      uploadImgAction,
+    };
+  },
 });
 </script>
 

+ 75 - 114
src/views/business/sell/components/storage/index.vue

@@ -1,26 +1,13 @@
 <template>
   <!-- 出库登记-->
-  <a-modal class="commonModal"
-           title="出库登记"
-           v-model:visible="visible"
-           @cancel="cancel"
-           centered
-           width="890px">
+  <a-modal class="commonModal" title="出库登记" v-model:visible="visible" @cancel="cancel" centered width="890px">
     <template #footer>
-      <a-button key="submit"
-                class="cancelBtn"
-                @click="cancel">取消
+      <a-button key="submit" class="cancelBtn" @click="cancel">取消
       </a-button>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading"
-                @click="submit">出库登记
+      <a-button key="submit" type="primary" :loading="loading" @click="submit">出库登记
       </a-button>
     </template>
-    <a-form class="inlineForm"
-            ref="formRef"
-            :model="formState"
-            :rules="rules">
+    <a-form class="inlineForm" ref="formRef" :model="formState" :rules="rules">
       <fieldset class="formFieldSet">
         <legend>合同基本信息</legend>
         <a-row :gutter="24">
@@ -49,11 +36,9 @@
       <fieldset class="formFieldSet">
         <legend>已登记信息</legend>
         <a-row :gutter="24">
-          <a-col :span="12"
-                 v-for="(item, i) in DGList"
-                 :key="i">
+          <a-col :span="12" v-for="(item, i) in DGList" :key="i">
             <a-form-item label="已入库量">
-              <span class="white">{{item.wrstandardname}} + {{item.brandname}}</span>
+              <span class="white">{{item.wrstandardname}} + {{item.brandname}} ({{item.totalqty + selectedRow.enumdicname}})</span>
             </a-form-item>
           </a-col>
           <!-- <a-col :span="12">
@@ -78,55 +63,31 @@
         <a-row :gutter="24">
           <a-col :span="12">
             <a-form-item label="商品">
-              <a-select class="inlineFormSelect"
-                        style="width: 200px"
-                        placeholder="请选择商品"
-                        v-model:value="selectedRow.wrstandardid"
-                        readonly>
-                <a-select-option v-for="option in gmlist"
-                                 :key="option.wrstandardid"
-                                 :value="option.wrstandardid">{{option.wrstandardname}}
+              <a-select class="inlineFormSelect" style="width: 200px" placeholder="请选择商品" v-model:value="selectedRow.wrstandardid" readonly>
+                <a-select-option v-for="option in gmlist" :key="option.wrstandardid" :value="option.wrstandardid">{{option.wrstandardname}}
                 </a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="品牌"
-                         name="SpotGoodsBrandID">
-              <a-select class="inlineFormSelect"
-                        style="width: 200px"
-                        placeholder="请选择品牌"
-                        v-model:value="formState.SpotGoodsBrandID">
-                <a-select-option v-for="option in gblist"
-                                 :key="option.brandid"
-                                 :value="option.brandid">{{option.brandname}}
+            <a-form-item label="品牌" name="SpotGoodsBrandID">
+              <a-select class="inlineFormSelect" style="width: 200px" placeholder="请选择品牌" v-model:value="formState.SpotGoodsBrandID">
+                <a-select-option v-for="option in gblist" :key="option.brandid" :value="option.brandid">{{option.brandname}}
                 </a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="出库仓库"
-                         name="WarehouseInfo">
-              <a-select class="inlineFormSelect"
-                        style="width: 200px"
-                        placeholder="请选择入库仓库"
-                        v-model:value="formState.WarehouseInfo">
-                <a-select-option v-for="option in wareHouseList"
-                                 :key="option.autoid"
-                                 :value="option.autoid">{{option.warehousecode}}
+            <a-form-item label="出库仓库" name="WarehouseInfo">
+              <a-select class="inlineFormSelect" style="width: 200px" placeholder="请选择入库仓库" v-model:value="formState.WarehouseInfo">
+                <a-select-option v-for="option in wareHouseList" :key="option.autoid" :value="option.autoid">{{option.warehousecode}}
                 </a-select-option>
               </a-select>
             </a-form-item>
           </a-col>
           <a-col :span="12">
-            <a-form-item label="出库数量"
-                         name="Qty">
-              <a-input-number class="dialogInput"
-                              style="width: 200px"
-                              suffix="单位"
-                              :min="0"
-                              placeholder="请输入出库数量"
-                              v-model:value="formState.Qty">
+            <a-form-item label="出库数量" name="Qty">
+              <a-input-number class="dialogInput" style="width: 200px" suffix="单位" :min="0" placeholder="请输入出库数量" v-model:value="formState.Qty">
               </a-input-number>
             </a-form-item>
           </a-col>
@@ -153,68 +114,68 @@ import { ermcpInOutStockApplyReq } from '@/services/proto/warehouse';
 import { _closeModal } from '@/common/setup/modal/modal';
 
 export default defineComponent({
-    name: 'sell_pending_storage',
-    emits: ['cancel', 'update'],
-    props: {
-        selectedRow: {
-            type: Object as PropType<Ermcp3SellBuyContract>,
-            default: {},
-        },
+  name: 'sell_pending_storage',
+  emits: ['cancel', 'update'],
+  props: {
+    selectedRow: {
+      type: Object as PropType<Ermcp3SellBuyContract>,
+      default: {},
     },
-    setup(props, context) {
-        const { visible, cancel } = _closeModal(context);
-        const { rules, formState, formRef } = handleForm();
-        const loading = ref<boolean>(false);
-        const wareHouseList = ref<ErmcpWareHouseInfo[]>([]);
-        const gblist = ref<[]>([]);
-        const gmlist = ref<[]>([]);
-        const DGList = ref<Ermcp3AreaStockApplySum[]>([]);
-        QueryAreaStockApply(props.selectedRow.spotcontractid)
-            .then((res) => {
-                DGList.value = res.filter((e) => e.inouttype === 1);
-            })
-            .catch((err) => message.error(err));
-        const deliverygoods = APP.get('DeliveryGoodsList').find((x: any) => x.data.deliverygoodsid === props.selectedRow.deliverygoodsid);
-        gblist.value = deliverygoods && deliverygoods.gblist;
-        gmlist.value = deliverygoods && deliverygoods.gmlist;
-        // 查询仓库信息
-        QueryWareHouse('1').then((res) => {
-            wareHouseList.value = res;
-        });
+  },
+  setup(props, context) {
+    const { visible, cancel } = _closeModal(context);
+    const { rules, formState, formRef } = handleForm();
+    const loading = ref<boolean>(false);
+    const wareHouseList = ref<ErmcpWareHouseInfo[]>([]);
+    const gblist = ref<[]>([]);
+    const gmlist = ref<[]>([]);
+    const DGList = ref<Ermcp3AreaStockApplySum[]>([]);
+    QueryAreaStockApply(props.selectedRow.spotcontractid)
+      .then((res) => {
+        DGList.value = res.filter((e) => e.inouttype === 6);
+      })
+      .catch((err) => message.error(err));
+    const deliverygoods = APP.get('DeliveryGoodsList').find((x: any) => x.data.deliverygoodsid === props.selectedRow.deliverygoodsid);
+    gblist.value = deliverygoods && deliverygoods.gblist;
+    gmlist.value = deliverygoods && deliverygoods.gmlist;
+    // 查询仓库信息
+    QueryWareHouse('1').then((res) => {
+      wareHouseList.value = res;
+    });
 
-        function submit() {
-            const wrapEl = unref(formRef);
-            wrapEl.validate().then(() => {
-                const params: ERMCPAreaInOutStockApplyReq = {
-                    InOutType: 6, //  5:采购入库 6:销售出库 7:生产入库 8:生产出库
-                    WRStandardID: props.selectedRow.wrstandardid, //品类ID
-                    SpotGoodsBrandID: formState.SpotGoodsBrandID || 0, //现货品牌ID(DGFactoryItem表的ID)
-                    DeliveryGoodsID: props.selectedRow.deliverygoodsid, //现货商品ID
-                    SpotContractID: Long.fromString(props.selectedRow.spotcontractid), //合同ID
-                    WarehouseInfo: formState.WarehouseInfo || 0, // uint64 现货仓库ID
-                    Qty: formState.Qty || 0, // double 数量t
-                    ApplyRemark: '', // string 申请备注
-                };
-                requestResultLoadingAndInfo(ermcpInOutStockApplyReq, params, loading, ['出库登记成功', '出库登记失败:']).then(() => {
-                    cancel(true);
-                });
-            });
-        }
-        return {
-            visible,
-            cancel,
-            submit,
-            loading,
-            formatValue,
-            rules,
-            formState,
-            formRef,
-            wareHouseList,
-            gblist,
-            gmlist,
-            DGList,
+    function submit() {
+      const wrapEl = unref(formRef);
+      wrapEl.validate().then(() => {
+        const params: ERMCPAreaInOutStockApplyReq = {
+          InOutType: 6, //  5:采购入库 6:销售出库 7:生产入库 8:生产出库
+          WRStandardID: props.selectedRow.wrstandardid, //品类ID
+          SpotGoodsBrandID: formState.SpotGoodsBrandID || 0, //现货品牌ID(DGFactoryItem表的ID)
+          DeliveryGoodsID: props.selectedRow.deliverygoodsid, //现货商品ID
+          SpotContractID: Long.fromString(props.selectedRow.spotcontractid), //合同ID
+          WarehouseInfo: formState.WarehouseInfo || 0, // uint64 现货仓库ID
+          Qty: formState.Qty || 0, // double 数量t
+          ApplyRemark: '', // string 申请备注
         };
-    },
+        requestResultLoadingAndInfo(ermcpInOutStockApplyReq, params, loading, ['出库登记成功', '出库登记失败:']).then(() => {
+          cancel(true);
+        });
+      });
+    }
+    return {
+      visible,
+      cancel,
+      submit,
+      loading,
+      formatValue,
+      rules,
+      formState,
+      formRef,
+      wareHouseList,
+      gblist,
+      gmlist,
+      DGList,
+    };
+  },
 });
 </script>
 

+ 1 - 1
src/views/business/sell/list/all/index.vue

@@ -55,7 +55,7 @@ export default defineComponent({
     sell_performance_settlement: defineAsyncComponent(() => import('../../components/settlement/index.vue')), //交收登记
     sell_performance_funds: defineAsyncComponent(() => import('../../components/funds/index.vue')), // 款项登记
     sell_performance_invoice: defineAsyncComponent(() => import('../../components/invoice/index.vue')), // 发票登记
-    sell_performance_storage: defineAsyncComponent(() => import('../../components/storage/index.vue')), // 库登记
+    sell_performance_storage: defineAsyncComponent(() => import('../../components/storage/index.vue')), // 库登记
     sell_performance_ending: defineAsyncComponent(() => import('@/views/information/spot-contract/components/finish/index.vue')), // 完结合同
   },
   setup() {

+ 4 - 1
src/views/information/custom/index.vue

@@ -76,7 +76,10 @@ export default defineComponent({
     // 获取列表数据
     const queryTableAction = () => {
       const userid = getUserId();
-      if (isRouterName('custom_checkpending')) {
+      if (isRouterName('custom_unsubmit')) {
+        // 未提交
+        queryTable(queryCustomerInfo, { userid, querytype: 1, includesub: 1 });
+      } else if (isRouterName('custom_checkpending')) {
         // 待审核
         queryTable(queryCustomerInfo, { userid, querytype: 2, includesub: 1 });
       } else if (isRouterName('custom_normal')) {

+ 1 - 1
src/views/market/futures/compoments/futures-trade/index.vue

@@ -35,7 +35,7 @@
               </template>
             </a-form-item>
             <a-form-item class="inputIconBox" label="交易数量" name="OrderQty">
-              <a-input-number class="commonInput" decimalSeparator="0" :min="1" v-model:value="formData.OrderQty" style="width:100%" />
+              <a-input-number class="commonInput" :precision="0" :min="1" v-model:value="formData.OrderQty" style="width:100%" />
               <MinusOutlined @click="minusQty" />
               <PlusOutlined @click="plusQty" />
             </a-form-item>