瀏覽代碼

修改bug

web100 2 年之前
父節點
當前提交
a80bd54bf4

+ 29 - 28
src/views/tirePartsMall/basicData/accountManagement/detailsPage.vue

@@ -3,26 +3,17 @@
     <div class="customer-head">
       <div class="customer-back">
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
-                   @click="backToList(0)">返回列表
+          @click="backToList(0)">返回列表
         </el-button>
       </div>
       <div class="add-customer-btn">
         <!--        <el-button class="el-button&#45;&#45;small-yh" style="margin-right: 10px" type="primary" size="small" v-if="!editButton"-->
         <!--                   @click="confirmEditing">编辑-->
         <!--        </el-button>-->
-        <el-button
-            class="el-button--small-yh"
-            type="primary"
-            size="small"
-            @click="editCustomer">保存数据
+        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
         </el-button>
-        <el-button
-            class="el-button--small-yh"
-            type="primary"
-            size="small"
-            @click="enableNot"
-            v-if="form.id">
-          {{form.enableOrNot == 0 ?'启用':'禁用'}}
+        <el-button class="el-button--small-yh" type="primary" size="small" @click="enableNot" v-if="form.id">
+          {{ form.enableOrNot == 0 ? '启用' : '禁用' }}
         </el-button>
       </div>
     </div>
@@ -36,7 +27,7 @@
 
 <script>
 
-import {typeSave,detail,editenable} from "@/api/tirePartsMall/basicData/accountManagement";
+import { typeSave, detail, editenable } from "@/api/tirePartsMall/basicData/accountManagement";
 
 export default {
   name: "detailsPage",
@@ -58,11 +49,16 @@ export default {
           label: '账户类型',
           prop: "accountType",
           type: 'select',
-          props: {
-              label: 'cname',
-              value: 'id'
-          },
-          // dicUrl: '/api/blade-sales-part/brandDesc/currency'
+          dicData: [
+            {
+              label: "人民币",
+              value:"人民币",
+            },
+            {
+              label: "外币",
+              value: "外币",
+            }
+          ],
         }, {
           label: '开户银行',
           prop: "bankDeposit"
@@ -80,15 +76,20 @@ export default {
           prop: "currency",
           span: 8,
           type: 'select',
-          props: {
-              label: 'cname',
-              value: 'id'
-          },
-          // dicUrl: '/api/blade-sales-part/brandDesc/currency'
+          dicData: [
+            {
+              label: "CNY",
+              value:"CNY",
+            },
+            {
+              label: "USD",
+              value: "USD",
+            }
+          ],
         }, {
           label: '账户余额',
           prop: "accountBalance"
-        },  {
+        }, {
           label: '备注',
           prop: "remarks",
           type: 'textarea',
@@ -107,13 +108,13 @@ export default {
     }
   },
   async created() {
-    if (this.onLoad.id){
+    if (this.onLoad.id) {
       this.queryData(this.onLoad.id)
     }
   },
   methods: {
     //启用禁用
-    enableNot(){
+    enableNot() {
       let data = this.form
       editenable({ id: data.id, enableOrNot: data.enableOrNot ? 0 : 1 }).then(res => {
         this.$message({
@@ -131,7 +132,7 @@ export default {
         spinner: 'el-icon-loading',
         background: 'rgba(255,255,255,0.7)'
       })
-      detail({id}).then(res => {
+      detail({ id }).then(res => {
         this.form = res.data.data;
         loading.close()
       }).finally(() => {

+ 13 - 1
src/views/tirePartsMall/basicData/customerInformation/js/optionList.js

@@ -32,7 +32,13 @@ export const option = {
     {
       label: "发货仓库",
       prop: "deliveryWarehouseName",
+      props: {
+        label: 'cname',
+        value: 'id'
+      },
+      dicUrl: '/api/blade-sales-part/storageDesc/listAll',
       overHidden: true,
+      type: 'select',
       search: true,
     },
     {
@@ -49,6 +55,12 @@ export const option = {
       label: "业务员",
       prop: "salesmanName",
       overHidden: true,
+      type: 'select',
+      props: {
+        label: "name",
+        value: "id"
+      },
+      dicUrl: "/api/blade-user/client/gainUser",
       search: true,
     },
     {
@@ -416,7 +428,7 @@ export const sellOption = {
     {
       label: "客户名称",
       prop: "corpId",
-      type: 'select',
+
       dicData: [],
       search: true,
       overHidden: true,

+ 0 - 7
src/views/tirePartsMall/basicData/supplier/index.vue

@@ -166,8 +166,6 @@ export default {
           search: {
             fuzzy: true // 启用模糊搜索
           },
-          type: 'select',
-          dicUrl: "/api/blade-sales-part/corpsDesc/listAll",
           props: {
             label: "cname",
             value: "id"
@@ -175,12 +173,7 @@ export default {
           overHidden: true,
         }, {
           label: '供应商分类',
-          type: 'select',
-          search: {
-            fuzzy: true // 启用模糊搜索
-          },
           prop: "corpsTypeName",
-          search: true,
           overHidden: true,
         }, {
           label: '电话',

+ 15 - 28
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -58,6 +58,10 @@
           </el-tab-pane>
         </el-tabs>
       </trade-card>
+      <report-dialog
+              :switchDialog="switchDialog"
+              @onClose="onClose()"
+            ></report-dialog>
     </div>
   </div>
 </template>
@@ -66,12 +70,14 @@
 
 import { getDetails, tradingBox, submit, warehousingComplete } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
 import { dateFormat } from "@/util/date";
-// 
+import reportDialog from "@/components/report-dialog/main";
+
 
 export default {
   name: "detailsPage",
   data() {
     return {
+      switchDialog: false,
       activeName: "sale_detail",
       disabled: false,
       form: {
@@ -337,6 +343,9 @@ export default {
       }
     }
   },
+  components: {
+    reportDialog
+  },
   props: {
     onLoad: Object,
     detailData: Object
@@ -443,34 +452,12 @@ export default {
     },
     //打印
     handlePrint() {
-      // 获取表格的表头和内容的HTML代码
-      const tableHeader = this.$refs.formContacts.$el.querySelector('.el-table__header-wrapper').outerHTML;
-      const tableContent = this.$refs.formContacts.$el.querySelector('.el-table__body-wrapper').outerHTML;
-      // 创建一个新的打印页面
-      const printWindow = window.open('', '_blank');
-
-      // 将新窗口的内容设置为表头和内容的HTML代码
-      printWindow.document.open();
-      printWindow.document.write(`
-        <html>
-          <head>
-            <style>
-              /* 添加打印样式 */
-            </style>
-          </head>
-          <body>
-            ${tableHeader}
-            ${tableContent}
-          </body>
-        </html>
-      `);
-      printWindow.document.close();
-
-      // 在新窗口中调用浏览器的打印功能
-      printWindow.print();
-      printWindow.close();
+      this.switchDialog = !this.switchDialog;
+        
+    },
+    onClose(val) {
+      this.switchDialog = val;
     },
-
     //自定义列保存
     async saveColumnTwo(ref, option, optionBack, code) {
       /**

+ 11 - 27
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -77,6 +77,10 @@
                     </el-tab-pane>
                 </el-tabs>
             </trade-card>
+            <report-dialog
+              :switchDialog="switchDialog"
+              @onClose="onClose()"
+            ></report-dialog>
         </div>
     </div>
 </template>
@@ -84,11 +88,13 @@
 <script>
 import { getDetails, submit, generateShipTask, tradingBox } from "@/api/tirePartsMall/salesManagement/saleOrder";
 import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
+import reportDialog from "@/components/report-dialog/main";
 
 export default {
     name: "detailsPage",
     data() {
         return {
+            switchDialog:false,
             activeName: "sale_detail",
             disabled: false,
             key: 0,
@@ -474,6 +480,7 @@ export default {
             }
         }
     },
+    components:{reportDialog},
     props: {
         onLoad: Object,
         detailData: Object
@@ -604,33 +611,10 @@ export default {
         },
         //打印
         handlePrint() {
-            // 获取表格的表头和内容的HTML代码
-            const tableHeader = this.$refs.formContacts.$el.querySelector('.el-table__header-wrapper').outerHTML;
-            const tableContent = this.$refs.formContacts.$el.querySelector('.el-table__body-wrapper').outerHTML;
-
-            // 创建一个新的打印页面
-            const printWindow = window.open('', '_blank');
-
-            // 将新窗口的内容设置为表头和内容的HTML代码
-            printWindow.document.open();
-            printWindow.document.write(`
-        <html>
-          <head>
-            <style>
-              /* 添加打印样式 */
-            </style>
-          </head>
-          <body>
-            ${tableHeader}
-            ${tableContent}
-          </body>
-        </html>
-      `);
-            printWindow.document.close();
-
-            // 在新窗口中调用浏览器的打印功能
-            printWindow.print();
-            printWindow.close();
+            this.switchDialog = !this.switchDialog; 
+        },
+        onClose(val) {
+            this.switchDialog = val;
         },
         //自定义列保存
         async saveColumnTwo(ref, option, optionBack, code) {