فهرست منبع

编辑采购单,已选产品新增查询条件

chenrui 3 سال پیش
والد
کامیت
ffdd5ff5f7

+ 1 - 1
src/components/custom.less

@@ -10,7 +10,7 @@ body{
 .table-page-search-wrapper {
   .ant-form.ant-form-inline{
     .ant-form-item {
-      margin-bottom: 10px;
+      margin-bottom: 10px!important;
       .ant-input,.ant-select-selection{
         border-radius: 2px;
         padding: 0px 11px;

+ 46 - 4
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -83,9 +83,9 @@
                         </a-form-item>
                       </a-col>
                     </template> -->
-                    <a-col :md="6" :sm="24">
-                      <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderEdit-refresh">查询</a-button>
-                      <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseOrderEdit-reset">重置</a-button>
+                    <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                      <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderEdit-refresh">查询</a-button>
+                      <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="purchaseOrderEdit-reset">重置</a-button>
                       <!-- <a @click="advanced=!advanced" style="margin-left: 8px">
                         {{ advanced ? '收起' : '展开' }}
                         <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -147,6 +147,38 @@
                   采购数量合计 <strong>{{ detail && (detail.totalQty || detail.totalQty==0) ? detail.totalQty : '--' }}</strong> ,
                   采购金额合计 <strong>{{ detail && (detail.discountedAmount || detail.discountedAmount==0) ? '¥'+detail.discountedAmount : '--' }}</strong></div>
               </a-alert>
+              <!-- 搜索条件 -->
+              <div class="table-page-search-wrapper">
+                <a-row :gutter="15">
+                  <a-col :span="18">
+                    <a-form-model :model="productForm" layout="inline" @keyup.enter.native="$refs.purchaseTable.refresh(true)" >
+                      <a-row :gutter="15">
+                        <a-col :md="8" :sm="24">
+                          <a-form-model-item label="产品编码">
+                            <a-input v-model="productForm.productCode" allowClear placeholder="输入产品编码" />
+                          </a-form-model-item>
+                        </a-col>
+                        <a-col :md="8" :sm="24">
+                          <a-form-model-item label="产品名称">
+                            <a-input v-model="productForm.productName" allowClear placeholder="输入产品名称" />
+                          </a-form-model-item>
+                        </a-col>
+                        <a-col :md="8" :sm="24">
+                          <a-form-model-item style="margin-bottom: 10px;">
+                            <a-button type="primary" @click="$refs.purchaseTable.refresh(true)" :disabled="purchaseDisabled" id="purchaseOrderEdit-refresh">查询</a-button>
+                            <a-button style="margin-left: 5px" @click="resetPurchaseForm" id="purchaseOrderEdit-reset">重置</a-button>
+                          </a-form-model-item>
+                        </a-col>
+                      </a-row>
+                    </a-form-model>
+                  </a-col>
+                  <a-col :span="6">
+                    <div style="float:right;overflow: hidden;">
+                      <a-button size="small" id="purchaseOrderEdit-dru">导入明细</a-button>
+                    </div>
+                  </a-col>
+                </a-row>
+              </div>
               <!-- 列表 -->
               <s-table
                 class="sTable"
@@ -259,6 +291,11 @@ export default {
       // -------已选产品-------------
       orderCountData: null,
       delLoading: false,
+      productForm: {
+        productName: '',
+        productCode: ''
+      },
+      purchaseDisabled: false, //  查询、重置按钮是否可操作
       // 表头
       chooseColumns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -274,7 +311,7 @@ export default {
       chooseLoadData: parameter => {
         this.disabled = true
         // 查询总计
-        const params = Object.assign(parameter, { purchaseBillSn: this.$route.params.sn })
+        const params = Object.assign(parameter, this.productForm, { purchaseBillSn: this.$route.params.sn })
         // this.getCountQuery(params)
         return purchaseDetailList(params).then(res => {
           const data = res.data
@@ -383,6 +420,11 @@ export default {
       this.productType = []
       this.$refs.table.refresh(true)
     },
+    resetPurchaseForm () {
+      this.productForm.productName = ''
+      this.productForm.productCode = ''
+      this.$refs.purchaseTable.refresh(true)
+    },
     //  添加或修改
     handleAdd (row, type) {
       let params = {}

+ 11 - 5
src/views/salesManagement/salesQuery/edit.vue

@@ -34,8 +34,14 @@
             <div>
               <div>
                 折扣金额:
-                <a-input-number id="discount" v-model="detailData.discountAmount" :min="0" :precision="2" :max="999999"/>
-                <a-button type="primary" @click="salesDiscount" class="button-info">打折</a-button>
+                <a-input-number
+                  id="discount"
+                  size="small"
+                  v-model="detailData.discountAmount"
+                  :min="0"
+                  :precision="2"
+                  :max="999999"/>
+                <a-button size="small" type="primary" @click="salesDiscount" class="button-info">打折</a-button>
               </div>
               <div>
                 折扣:<strong>{{ detailData&&(detailData.discountRate || detailData.discountRate==0) ? detailData.discountRate+'%' : '--' }}</strong>;
@@ -61,9 +67,9 @@
                     </a-form-model-item>
                   </a-col>
                   <a-col :md="8" :sm="24">
-                    <a-form-model-item>
-                      <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
-                      <a-button style="margin: 0 0 18px 8px" @click="resetForm" id="salesEdit-reset">重置</a-button>
+                    <a-form-model-item style="margin-bottom: 10px;">
+                      <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesEdit-refresh">查询</a-button>
+                      <a-button style="margin-left: 5px" @click="resetForm" id="salesEdit-reset">重置</a-button>
                     </a-form-model-item>
                   </a-col>
                 </a-row>

+ 3 - 3
src/views/salesManagement/salesQuery/queryPart.vue

@@ -79,9 +79,9 @@
               </a-form-model-item>
             </a-col>
           </template>
-          <a-col :md="7" :sm="24">
-            <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
-            <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" id="productInfoList-reset">重置</a-button>
+          <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
+            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
+            <a-button style="margin-left: 5px" @click="resetSearchForm" id="productInfoList-reset">重置</a-button>
             <a @click="advanced=!advanced" style="margin:0 15px 0 8px">
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>