web100 2 роки тому
батько
коміт
904b2432c6

+ 2 - 1
src/api/basicData/product.js

@@ -21,7 +21,8 @@ export const getGoodstype = () => {
 
 export const getDetails = (data) => {
     return request({
-        url: '/api/blade-client/goodsDescParts/partsDetails',
+        // url: '/api/blade-client/goodsDescParts/partsDetails',
+        url: '/api/blade-sales-part/goodsDesc/detail',
         method: 'get',
         params: data
     })

+ 8 - 0
src/api/tirePartsMall/basicData/accountManagement/index.js

@@ -33,3 +33,11 @@ export const detail = (params) => {
     params: params
   })
 }
+//禁用启用
+export function editenable(data) {
+  return request({
+    url: '/api/blade-sales-part/accountManagement/updateEnableOrNot',
+    method: 'get',
+    params: data
+  })
+}

+ 30 - 4
src/views/tirePartsMall/basicData/accountManagement/detailsPage.vue

@@ -36,7 +36,7 @@
 
 <script>
 
-import {typeSave,detail} from "@/api/tirePartsMall/basicData/accountManagement";
+import {typeSave,detail,editenable} from "@/api/tirePartsMall/basicData/accountManagement";
 
 export default {
   name: "detailsPage",
@@ -56,7 +56,13 @@ export default {
           }]
         }, {
           label: '账户类型',
-          prop: "accountType"
+          prop: "accountType",
+          type: 'select',
+          props: {
+              label: 'cname',
+              value: 'id'
+          },
+          // dicUrl: '/api/blade-sales-part/brandDesc/currency'
         }, {
           label: '开户银行',
           prop: "bankDeposit"
@@ -71,7 +77,14 @@ export default {
           prop: "corporateName"
         }, {
           label: '币别',
-          prop: "currency"
+          prop: "currency",
+          span: 8,
+          type: 'select',
+          props: {
+              label: 'cname',
+              value: 'id'
+          },
+          // dicUrl: '/api/blade-sales-part/brandDesc/currency'
         }, {
           label: '账户余额',
           prop: "accountBalance"
@@ -99,7 +112,17 @@ export default {
     }
   },
   methods: {
-    enableNot(){},
+    //启用禁用
+    enableNot(){
+      let data = this.form
+      editenable({ id: data.id, enableOrNot: data.enableOrNot ? 0 : 1 }).then(res => {
+        this.$message({
+          type: "success",
+          message: data.enableOrNot ? "禁用成功!" : "启用成功!"
+        });
+        this.$set(this.form, 'enableOrNot', data.enableOrNot == 1 ? 0 : 1)
+      })
+    },
     // 查询
     queryData(id) {
       const loading = this.$loading({
@@ -125,6 +148,9 @@ export default {
             spinner: 'el-icon-loading',
             background: 'rgba(255,255,255,0.7)'
           })
+          if (!this.form.id && !this.form.enableOrNot) {
+            this.form.enableOrNot = 1;
+          }
           typeSave(this.form).then(res => {
             loading.close()
             this.$message({

+ 9 - 8
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -91,21 +91,21 @@
 <script>
 import {
   getGoodstype,
-  getDetails,
+//   getDetails,
   goodsTypesubmit,
   getStoragetype,
-  submit,
+//   submit,
   itemRemove,
-  disabled,
+//   disabled,
   getStoragelist,
   storagesubmit } from "@/api/basicData/product";
 import {
-    // getDetails,
+    getDetails,
     getCorpType,
-    // submit,
+    submit,
     customerList,
     itemDel,
-    // disabled
+    disabled
 } from "@/api/tirePartsMall/basicData/commodityInformation"
 import {optionList} from "./js/optionList";
 import goodsType from '@/components/goodsType/index'
@@ -629,13 +629,14 @@ export default {
                 // this.data = res.data.data.stockGoodsList;
                 this.filesList = res.data.data.goodsFilesList
                 this.whetherChange(res.data.data.whether)
+                //如果modifiable为0则不能修改
                 if (this.form.modifiable == 0) {
                     for (let item of this.option.column) {
-                        item.disabled = true
+                        item.disabled = false
                     }
                 } else {
                     for (let item of this.option.column) {
-                        item.disabled = false
+                        item.disabled = true
                     }
                 }
                 this.key++

+ 1 - 0
src/views/tirePartsMall/basicData/listingManagement/index.vue

@@ -169,6 +169,7 @@ export default {
         }, {
           label: '规格型号',
           prop: 'specificationAndModel',
+          search: true,
           overHidden: true,
         }, {
           label: '公司',

+ 1 - 0
src/views/tirePartsMall/basicData/shareListing/index.vue

@@ -168,6 +168,7 @@ export default {
         }, {
           label: '规格型号',
           prop: 'specificationAndModel',
+          search: true,
           overHidden: true,
         }, {
           label: '公司',

+ 34 - 2
src/views/tirePartsMall/salesManagement/outboundTask/index.vue

@@ -112,12 +112,44 @@ export default {
           prop: "bsType",
           width: 100,
           overHidden: true,
-        }, {
+        }, 
+        // {
+        //   label: '来源公司',
+        //   prop: "sourceCompanyId",
+        //   width: 100,
+        //   overHidden: true,
+        // },
+        {
+          label: '发货仓库',
+          prop: "storageName",
+          width: 100,
+          overHidden: true,
+        },
+        //  {
+        //   label: '发货库管',
+        //   prop: "bsType",
+        //   width: 100,
+        //   overHidden: true,
+        // },  
+        {
           label: '收货地址',
           prop: "recAddress",
           width: 200,
           overHidden: true,
-        }, {
+        }, 
+                //  {
+        //   label: '销售数量',
+        //   prop: "bsType",
+        //   width: 100,
+        //   overHidden: true,
+        // }, 
+                //  {
+        //   label: '发货数量',
+        //   prop: "bsType",
+        //   width: 100,
+        //   overHidden: true,
+        // },  
+         {
           label: '联系人',
           prop: "contacts",
           width: 100,

+ 89 - 91
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -3,24 +3,16 @@
         <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"
-                    v-if="form.status !== '已发货'"
+                <el-button class="el-button--small-yh" type="primary" size="small" v-if="form.status !== '已发货'"
                     @click="generateOutbound">生成出库任务
                 </el-button>
             </div>
@@ -32,64 +24,53 @@
             <trade-card title="明细信息">
                 <el-tabs v-model="activeName" type="card">
                     <el-tab-pane label="销售明细" name="sale_detail">
-                        <avue-crud :option="optionContacts"
-                                   v-model="formContacts"
-                                   ref="formContacts"
-                                   :data="form.orderItemsList"
-                                   :key="key"
-                                   @row-save="rowSave"
-                                   @row-update="rowUpdate"
-                                   @resetColumn="resetColumnTwo('formContacts','optionContacts','optionContactsBack',269.1)"
-                                   @saveColumn="saveColumnTwo('formContacts','optionContacts','optionContactsBack',269.1)">
+                        <avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts"
+                            :data="form.orderItemsList" :key="key" @row-save="rowSave" @row-update="rowUpdate"
+                            @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 269.1)"
+                            @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 269.1)">
+                            <template slot-scope="scope" slot="menuLeft">
+                                <el-button type="primary" icon="el-icon-printer" size="small"
+                                    @click="handlePrint">打印</el-button>
+                            </template>
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-                                <el-button
-                                    :size="size" :disabled="disabled" :type="type"
-                                    :icon="row.$cellEdit?'el-icon-plus':'el-icon-edit'"
-                                    @click="$refs.formContacts.rowEdit(row,index)"
-                                >编辑
+                                <el-button :size="size" :disabled="disabled" :type="type"
+                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
+                                    @click="$refs.formContacts.rowEdit(row, index)">编辑
                                 </el-button>
                                 <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
-                                           @click="rowDelBox(row,index,'orderItemsList')">删除
+                                    @click="rowDelBox(row, index, 'orderItemsList')">删除
                                 </el-button>
                             </template>
                         </avue-crud>
                     </el-tab-pane>
                     <el-tab-pane label="支付明细" name="payment_details">
                         <avue-crud :option="optionPaymentDetails" v-model="formContacts" ref="payment_details"
-                                   :data="form.paymentRecordsList"
-                                   @row-save="rowSave"
-                                   @row-update="rowUpdate"
-                                   @resetColumn="resetColumnTwo('payment_details','optionPaymentDetails','optionPaymentDetailsBack',269.2)"
-                                   @saveColumn="saveColumnTwo('payment_details','optionPaymentDetails','optionPaymentDetailsBack',269.2)">
+                            :data="form.paymentRecordsList" @row-save="rowSave" @row-update="rowUpdate"
+                            @resetColumn="resetColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 269.2)"
+                            @saveColumn="saveColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 269.2)">
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-                                <el-button
-                                    :size="size" :disabled="disabled" :type="type"
-                                    :icon="row.$cellEdit?'el-icon-plus':'el-icon-edit'"
-                                    @click="$refs.formContacts.rowCell(row,index)"
-                                >{{ row.$cellEdit ? '确认' : '修改' }}
+                                <el-button :size="size" :disabled="disabled" :type="type"
+                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
+                                    @click="$refs.formContacts.rowCell(row, index)">{{ row.$cellEdit ? '确认' : '修改' }}
                                 </el-button>
                                 <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
-                                           @click="rowDelBox(row,index,'paymentRecordsList')">删除
+                                    @click="rowDelBox(row, index, 'paymentRecordsList')">删除
                                 </el-button>
                             </template>
                         </avue-crud>
                     </el-tab-pane>
                     <el-tab-pane label="出库记录" name="outbound_records">
                         <avue-crud :option="optionOutboundRecords" v-model="formContacts" ref="outbound_records"
-                                   :data="form.outboundRecordsList"
-                                   @row-save="rowSave"
-                                   @row-update="rowUpdate"
-                                   @resetColumn="resetColumnTwo('outbound_records','optionOutboundRecords','optionOutboundRecordsBack',269.3)"
-                                   @saveColumn="saveColumnTwo('outbound_records','optionOutboundRecords','optionOutboundRecordsBack',269.3)">
+                            :data="form.outboundRecordsList" @row-save="rowSave" @row-update="rowUpdate"
+                            @resetColumn="resetColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 269.3)"
+                            @saveColumn="saveColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 269.3)">
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-                                <el-button
-                                    :size="size" :disabled="disabled" :type="type"
-                                    :icon="row.$cellEdit?'el-icon-plus':'el-icon-edit'"
-                                    @click="$refs.formContacts.rowCell(row,index)"
-                                >{{ row.$cellEdit ? '确认' : '修改' }}
+                                <el-button :size="size" :disabled="disabled" :type="type"
+                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
+                                    @click="$refs.formContacts.rowCell(row, index)">{{ row.$cellEdit ? '确认' : '修改' }}
                                 </el-button>
                                 <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
-                                           @click="rowDelBox(row,index)">删除
+                                    @click="rowDelBox(row, index)">删除
                                 </el-button>
                             </template>
                         </avue-crud>
@@ -101,8 +82,8 @@
 </template>
 
 <script>
-import {getDetails, submit, generateShipTask, tradingBox} from "@/api/tirePartsMall/salesManagement/saleOrder";
-import {dotList, goodsDetail} from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
+import { getDetails, submit, generateShipTask, tradingBox } from "@/api/tirePartsMall/salesManagement/saleOrder";
+import { dotList, goodsDetail } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 
 export default {
     name: "detailsPage",
@@ -236,6 +217,17 @@ export default {
                 refreshBtn: false,
                 dialogDrag: true,
                 addBtn: true,
+                btns: [
+                    {
+                        text: "录入明细",
+                        type: "primary"
+                    },
+                    {
+                        text: "打印",
+                        type: "default",
+                        click: "handlePrint"
+                    }
+                ],
                 span: 8,
                 height: 500,
                 addRowBtn: false,
@@ -346,13 +338,14 @@ export default {
                         value: "dot"
                     },
                     overHidden: true,
-                    width: 100
-                }, {
-                    label: '价格',
-                    prop: 'price',
-                    overHidden: true,
-                    width: 100
-                }, {
+                },
+                // {
+                //     label: '价格',
+                //     prop: 'price',
+                //     overHidden: true,
+                //     width: 100
+                // }, 
+                {
                     label: '发货数量',
                     prop: 'sendNum',
                     overHidden: true,
@@ -362,29 +355,30 @@ export default {
                     prop: 'grossProfit',
                     overHidden: true,
                     width: 100
-                }
-                    // , {
-                    //   label: '利润',
-                    //   prop: 'profit',
-                    //   overHidden: true,
-                    //   width: 100
-                    // }
-                    , {
-                        label: '小计',
-                        prop: 'subTotalMoney',
-                        overHidden: true,
-                        width: 100
-                    }, {
-                        label: '返利',
-                        prop: 'thisAmount',
-                        overHidden: true,
-                        width: 100
-                    }, {
-                        label: '成本',
-                        prop: 'costprie',
-                        overHidden: true,
-                        width: 100
-                    }]
+                },
+                // {
+                //   label: '利润',
+                //   prop: 'profit',
+                //   overHidden: true,
+                //   width: 100
+                // }
+                // , {
+                //     label: '小计',
+                //     prop: 'subTotalMoney',
+                //     overHidden: true,
+                //     width: 100
+                // }, {
+                //     label: '返利',
+                //     prop: 'thisAmount',
+                //     overHidden: true,
+                //     width: 100
+                // }, 
+                {
+                    label: '成本',
+                    prop: 'costprie',
+                    overHidden: true,
+                    width: 100
+                }]
             },
             optionPaymentDetails: {},
             optionPaymentDetailsBack: {
@@ -457,9 +451,9 @@ export default {
     },
     async created() {
         this.optionContacts = await this.getColumnData(this.getColumnName(269.1), this.optionContactsBack);
-        this.findObject(this.optionContacts.column, "goodsId").change = ({value, column}) => {
+        this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
             if (this.formContacts.goodsId !== value) {
-                goodsDetail({id: value}).then(res => {
+                goodsDetail({ id: value }).then(res => {
                     this.formContacts.goodsNo = res.data.data.code
                     this.formContacts.brandId = res.data.data.brandId
                     this.formContacts.propertyName = res.data.data.specificationAndModel
@@ -548,7 +542,7 @@ export default {
                 spinner: 'el-icon-loading',
                 background: 'rgba(255,255,255,0.7)'
             })
-            getDetails({id: id}).then(res => {
+            getDetails({ id: id }).then(res => {
                 this.form = res.data.data
                 loading.close();
             }).catch(() => {
@@ -561,16 +555,16 @@ export default {
                 cancelButtonText: "取消",
                 type: "warning"
             }).then(() => {
-                    if (row.id) {
-                        tradingBox(row.id).then(res => {
-                            this.form.contactsList.splice(index, 1);
-                            this.$message.success("操作成功!");
-                        });
-                    } else {
-                        this.form[type].splice(index, 1);
+                if (row.id) {
+                    tradingBox(row.id).then(res => {
+                        this.form.contactsList.splice(index, 1);
                         this.$message.success("操作成功!");
-                    }
+                    });
+                } else {
+                    this.form[type].splice(index, 1);
+                    this.$message.success("操作成功!");
                 }
+            }
             );
         },
         rowSave(form, done, loading) {
@@ -579,6 +573,10 @@ export default {
         rowUpdate(form, index, done, loading) {
             done(form)
         },
+        //打印
+        handlePrint() {
+            this.$print('formContacts');
+        },
         //自定义列保存
         async saveColumnTwo(ref, option, optionBack, code) {
             /**

+ 6 - 1
src/views/tirePartsMall/salesManagement/saleOrder/index.vue

@@ -89,11 +89,16 @@ export default {
           prop: "srcOrdNo",
           search: true,
           overHidden: true,
-        }, {
+        }, 
+        {
           label: "业务来源",
           prop: "businessSource",
           overHidden: true,
         }, {
+          label: '所属公司',
+          prop: "salesCompanyName",
+          overHidden: true,
+        }, {
           label: '业务对象',
           prop: "customerId",
           search: true,