Browse Source

Merge remote-tracking branch 'origin/dev' into dev

纪新园 2 years ago
parent
commit
8cc818118b

+ 1 - 1
src/views/exportTrade/purchaseContract/config/mainList.json

@@ -45,7 +45,7 @@
     },
     {
       "label": "销售订单号",
-      "prop": "orgOrderNo",
+      "prop": "srcOrderNo",
       "search": true,
       "searchSpan": 8,
       "index": 3.1,

+ 43 - 48
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -4,7 +4,7 @@
             <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">
+                        @click="backToList">
                         返回列表
                     </el-button>
                 </div>
@@ -24,50 +24,42 @@
                 <avue-form ref="form" class="trading-form" v-model="form" :option="option" :key="key">
                     <template slot="goodsTypeId" slot-scope="{disabled}">
                         <div style="display:flex;">
-                            <avue-cascader :disabled="disabled" :emit-path="false" check-strictly
-                                           :show-all-levels="false"
-                                           v-model="form.goodsTypeId"
-                                           placeholder="请选择产品分类" :dic="goodsTypeList"
-                                           :props="props"></avue-cascader>
-                            <i class="el-icon-circle-plus-outline"
-                               style="font-size:18px;line-height: 32px;margin-left:4px"
-                               @click="goodsTypeVisible = true"></i>
+                            <avue-cascader :disabled="disabled" :emit-path="false" check-strictly :show-all-levels="false"
+                                v-model="form.goodsTypeId" placeholder="请选择产品分类" :dic="goodsTypeList"
+                                :props="props"></avue-cascader>
+                            <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
+                                @click="goodsTypeVisible = true"></i>
                         </div>
                     </template>
                     <template slot="unit" slot-scope="{disabled}">
                         <div style="display:flex;">
                             <avue-select :disabled="disabled" v-model="form.unit" filterable placeholder="请选择单位"
-                                         :dic="unitList"
-                                         :props="props2"></avue-select>
-                            <i class="el-icon-circle-plus-outline"
-                               style="font-size:18px;line-height: 32px;margin-left:4px"
-                               @click="$refs.dictbiz.open()"></i>
+                                :dic="unitList" :props="props2"></avue-select>
+                            <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
+                                @click="$refs.dictbiz.open()"></i>
                         </div>
                     </template>
                     <template slot="whether" slot-scope="{disabled}">
                         <!--<el-switch v-model="form.whether" active-text="是" inactive-text="否" active-value="1" inactive-value="0" @change="whetherChange"/>-->
                         <el-switch v-model="form.whether" :disabled="disabled" active-text="是" inactive-text="否"
-                                   active-value="1"
-                                   inactive-value="0"/>
+                            active-value="1" inactive-value="0" />
                     </template>
                     <template slot="explosionProof" slot-scope="{disabled}">
-                        <el-switch v-model="form.explosionProof" :disabled="disabled" active-text="是"
-                                   inactive-text="否"
-                                   active-value="1"
-                                   inactive-value="0"/>
+                        <el-switch v-model="form.explosionProof" :disabled="disabled" active-text="是" inactive-text="否"
+                            active-value="1" inactive-value="0" />
                     </template>
                 </avue-form>
             </trade-card>
             <containerTitle title="附件信息"></containerTitle>
             <c-upload :data="filesList" display deleteUrl="/api/blade-sales-part/goodsfiles/remove"
-                      :enumerationValue="160"/>
-            <el-dialog title="设置产品分类" v-dialogDrag :visible.sync="goodsTypeVisible" class="avue-dialog"
-                       width="80%" append-to-body @closed="goodsTypeClosed">
-        <span>
-          <!-- <avue-form :key="reload" ref="goodsType" v-model="form2" :option="option2" style="margin-top:20px"></avue-form> -->
-            <!--<goods-type></goods-type>-->
-          <corp-type></corp-type>
-        </span>
+                :enumerationValue="160" />
+            <el-dialog title="设置产品分类" v-dialogDrag :visible.sync="goodsTypeVisible" class="avue-dialog" width="80%"
+                append-to-body @closed="goodsTypeClosed">
+                <span>
+                    <!-- <avue-form :key="reload" ref="goodsType" v-model="form2" :option="option2" style="margin-top:20px"></avue-form> -->
+                    <!--<goods-type></goods-type>-->
+                    <corp-type></corp-type>
+                </span>
                 <div class="avue-dialog__footer">
                     <el-button @click="goodsTypeVisible = false" size="mini">取 消</el-button>
                     <el-button @click="saveGoodstype" type="primary" size="mini">确 定</el-button>
@@ -83,22 +75,23 @@
             <!--  </div>-->
             <!--</el-dialog>-->
             <dictbiz-dialog ref="dictbiz" title="添加单位" code="unit" parentId="1585962784498225154"
-                            @closed="getAllWorkDicts"></dictbiz-dialog>
+                @closed="getAllWorkDicts"></dictbiz-dialog>
         </div>
     </div>
 </template>
 
 <script>
 import {
-  getGoodstype,
-//   getDetails,
-  goodsTypesubmit,
-  getStoragetype,
-//   submit,
-  itemRemove,
-//   disabled,
-  getStoragelist,
-  storagesubmit } from "@/api/basicData/product";
+    getGoodstype,
+    //   getDetails,
+    goodsTypesubmit,
+    getStoragetype,
+    //   submit,
+    itemRemove,
+    //   disabled,
+    getStoragelist,
+    storagesubmit
+} from "@/api/basicData/product";
 import {
     getDetails,
     getCorpType,
@@ -107,7 +100,7 @@ import {
     itemDel,
     disabled
 } from "@/api/tirePartsMall/basicData/commodityInformation"
-import {optionList} from "./js/optionList";
+import { optionList } from "./js/optionList";
 import goodsType from '@/components/goodsType/index'
 import corpType from './components/index'
 
@@ -526,7 +519,7 @@ export default {
             //   this.goodsTypeList = res.data.data;
             //   this.findObject(this.option2.column, "parentId").dicData = res.data.data;
             // });
-            customerList({corpType: "SP"}).then(res => {
+            customerList({ corpType: "SP" }).then(res => {
                 this.goodsTypeList = res.data.data.records;
                 this.findObject(this.option2.column, "parentId").dicData = res.data.data.records;
             });
@@ -542,7 +535,7 @@ export default {
             return "padding:0;height:40px;";
         },
         addRow() {
-            this.data.push({$cellEdit: true})
+            this.data.push({ $cellEdit: true })
         },
         rowCell(row, index) {
             this.$refs.crud.rowCell(row, index)
@@ -560,7 +553,7 @@ export default {
                 type: "warning"
             }).then(() => {
                 if (row.id) {
-                    itemRemove({ids: row.id}).then(res => {
+                    itemRemove({ ids: row.id }).then(res => {
                         this.$message({
                             type: "success",
                             message: "删除成功!"
@@ -577,7 +570,7 @@ export default {
             });
         },
         disabled(val) {
-            disabled({id: this.form.id, enableOrNot: val}).then(res => {
+            disabled({ id: this.form.id, enableOrNot: val }).then(res => {
                 this.$message({
                     type: "success",
                     message: val ? '禁用成功' : '启用成功'
@@ -589,7 +582,7 @@ export default {
             this.$refs["goodsType"].validate((valid, done) => {
                 done();
                 if (valid) {
-                    goodsTypesubmit({...this.form2, status: 0}).then(res => {
+                    goodsTypesubmit({ ...this.form2, status: 0 }).then(res => {
                         this.getAllWorkDicts()
                     })
                     this.goodsTypeVisible = false
@@ -623,7 +616,7 @@ export default {
         },
         getDetail(id) {
             this.loadingBtn = true
-            getDetails({id: id}).then(res => {
+            getDetails({ id: id }).then(res => {
                 this.form = res.data.data;
                 this.form.explosionProof += ''
                 // this.data = res.data.data.stockGoodsList;
@@ -631,12 +624,14 @@ export default {
                 this.whetherChange(res.data.data.whether)
                 //如果modifiable为0则不能修改
                 if (this.form.modifiable == 0) {
+                    console.log(this.form.modifiable, '0');
                     for (let item of this.option.column) {
-                        item.disabled = false
+                        item.disabled = true
                     }
-                } else {
+                } else if (this.form.modifiable == 1) {
+                    // console.log(this.form.modifiable, '1');
                     for (let item of this.option.column) {
-                        item.disabled = true
+                        item.disabled = false
                     }
                 }
                 this.key++

+ 93 - 95
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -3,25 +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"
-                    v-if="form.statusName != '已入库'"
+                <el-button class="el-button--small-yh" type="primary" size="small" v-if="form.statusName != '已入库'"
                     @click="editCustomer">保存数据
                 </el-button>
-                <el-button
-                    class="el-button--small-yh"
-                    type="success"
-                    size="small"
-                    v-if="form.statusName == '待入库'"
+                <el-button class="el-button--small-yh" type="success" size="small" v-if="form.statusName == '待入库'"
                     @click="complete">入库完成
                 </el-button>
             </div>
@@ -34,56 +26,45 @@
                 <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.shipItemsList"
-                                   :key="key"
-                                   @row-save="rowSave"
-                                   @row-update="rowUpdate"
-                                   @resetColumn="resetColumnTwo('formContacts','optionContacts','optionContactsBack',274.1)"
-                                   @saveColumn="saveColumnTwo('formContacts','optionContacts','optionContactsBack',274.1)">
+                            :data="form.shipItemsList" :key="key" @row-save="rowSave" @row-update="rowUpdate"
+                            @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 274.1)"
+                            @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 274.1)">
                             <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)">删除
+                                    @click="rowDelBox(row, index)">删除
                                 </el-button>
                             </template>
                             <template slot="menuLeft">
                                 <el-button type="success" size="small" icon="el-icon-bottom" @click="excelBox = true">导入
                                 </el-button>
+                                <el-button type="primary" icon="el-icon-printer" size="small"
+                                    @click="handlePrint">打印</el-button>
                             </template>
                         </avue-crud>
                     </el-tab-pane>
                     <el-tab-pane label="订单信息" name="payment_details">
-                        <avue-crud :option="optionPaymentDetails" ref="payment_details"
-                                   :data="form.shipVOList"
-                                   :key="key"
-                                   @resetColumn="resetColumnTwo('payment_details','optionPaymentDetails','optionPaymentDetailsBack',274.2)"
-                                   @saveColumn="saveColumnTwo('payment_details','optionPaymentDetails','optionPaymentDetailsBack',274.2)">
+                        <avue-crud :option="optionPaymentDetails" ref="payment_details" :data="form.shipVOList" :key="key"
+                            @resetColumn="resetColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 274.2)"
+                            @saveColumn="saveColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 274.2)">
                         </avue-crud>
                     </el-tab-pane>
                     <el-tab-pane label="历史记录" name="outbound_records">
-                        <avue-crud :option="optionOutboundRecords" ref="outbound_records"
-                                   :data="form.historyList"
-                                   :key="key"
-                                   @resetColumn="resetColumnTwo('outbound_records','optionOutboundRecords','optionOutboundRecordsBack',274.3)"
-                                   @saveColumn="saveColumnTwo('outbound_records','optionOutboundRecords','optionOutboundRecordsBack',274.3)">
+                        <avue-crud :option="optionOutboundRecords" ref="outbound_records" :data="form.historyList"
+                            :key="key"
+                            @resetColumn="resetColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 274.3)"
+                            @saveColumn="saveColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 274.3)">
                         </avue-crud>
                     </el-tab-pane>
                 </el-tabs>
             </trade-card>
         </div>
         <el-dialog title="导入明细" append-to-body :visible.sync="excelBox" v-if="excelBox" width="555px"
-                   :close-on-click-modal="false"
-                   v-dialog-drag>
-            <avue-form
-                :option="excelOption"
-                v-model="excelForm"
-                table-loading="excelLoading"
-                :upload-before="uploadBefore"
+            :close-on-click-modal="false" v-dialog-drag>
+            <avue-form :option="excelOption" v-model="excelForm" table-loading="excelLoading" :upload-before="uploadBefore"
                 :upload-after="uploadAfter">
                 <template slot="excelTemplate">
                     <el-button type="primary" @click="derivation">
@@ -108,9 +89,9 @@ import {
     goodsDetail,
     dotList
 } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
-import {dateFormat} from "@/util/date";
-import {getToken} from "@/util/auth";
-import {getMenu} from "@/api/system/menu";
+import { dateFormat } from "@/util/date";
+import { getToken } from "@/util/auth";
+import { getMenu } from "@/api/system/menu";
 
 export default {
     name: "detailsPage",
@@ -160,20 +141,6 @@ export default {
                 span: 8,
                 column: [
                     {
-                        label: "入库单号",
-                        prop: "ordNo",
-                        rules: [
-                            {
-                                required: true,
-                                message: " ",
-                                trigger: "blur"
-                            }
-                        ],
-                    },
-                    {
-                        label: "来源单号",
-                        prop: "srcOrdNo"
-                    }, {
                         label: "业务对象",
                         prop: "customerId",
                         type: 'select',
@@ -189,7 +156,8 @@ export default {
                                 trigger: "blur"
                             }
                         ]
-                    }, {
+                    },
+                    {
                         label: "仓库",
                         prop: "storageId",
                         search: true,
@@ -207,7 +175,23 @@ export default {
                                 trigger: "blur"
                             }
                         ]
-                    }, {
+                    },
+                    {
+                        label: '库管',
+                        prop: "stockClerkId",
+                        type: 'select',
+                        props: {
+                            label: 'realName',
+                            value: 'id'
+                        },
+                        dicUrl: '/api/blade-user/stockClerkList',
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    }, 
+                    {
                         label: "商品数量",
                         prop: "goodsTotalNum",
                         search: false,
@@ -220,7 +204,8 @@ export default {
                                 trigger: "blur"
                             }
                         ]
-                    }, {
+                    },
+                    {
                         label: "业务日期",
                         prop: "createTime",
                         type: "datetime",
@@ -234,21 +219,22 @@ export default {
                                 trigger: "blur"
                             }
                         ]
-                    }, {
-                        label: '库管',
-                        prop: "stockClerkId",
-                        type: 'select',
-                        props: {
-                            label: 'realName',
-                            value: 'id'
-                        },
-                        dicUrl: '/api/blade-user/stockClerkList',
-                        rules: [{
-                            required: true,
-                            message: " ",
-                            trigger: "blur"
-                        }]
-                    }, {
+                    },
+                    {
+                        label: "入库单号",
+                        prop: "ordNo",
+                        rules: [
+                            {
+                                required: true,
+                                message: " ",
+                                trigger: "blur"
+                            }
+                        ],
+                    },
+                    {
+                        label: "来源单号",
+                        prop: "srcOrdNo"
+                    },  {
                         label: '备注',
                         prop: "remarks",
                         type: 'textarea',
@@ -322,10 +308,10 @@ export default {
                     label: "批次号",
                     prop: "dot",
                     type: "select",
-                    disabled:false,
-                    allowCreate:true,
-                    filterable:true,
-                    dicData:[],
+                    disabled: false,
+                    allowCreate: true,
+                    filterable: true,
+                    dicData: [],
                     props: {
                         label: "dot",
                         value: "dot"
@@ -480,23 +466,23 @@ export default {
     },
     async created() {
         this.optionContacts = await this.getColumnData(this.getColumnName(274.1), this.optionContactsBack);
-        this.findObject(this.optionContacts.column, "goodsId").change = ({value, column}) => {
-            if (this.formContacts.goodsId !== value){
-                goodsDetail({id: value}).then(res => {
+        this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
+            if (this.formContacts.goodsId !== value) {
+                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
                     this.formContacts.pattern = res.data.data.brandItem
                     this.formContacts.goodsDescription = res.data.data.goodsDescription
                     this.formContacts.units = res.data.data.unit
-                    if (res.data.data.whether == 0){
+                    if (res.data.data.whether == 0) {
                         this.findObject(this.optionContacts.column, "dot").disabled = true
-                    }else {
+                    } else {
                         this.findObject(this.optionContacts.column, "dot").disabled = false
                         dotList({
-                            storageId:this.form.storageId,
-                            goodsId:this.formContacts.goodsId
-                        }).then(res=>{
+                            storageId: this.form.storageId,
+                            goodsId: this.formContacts.goodsId
+                        }).then(res => {
                             this.findObject(this.optionContacts.column, "dot").dicData = res.data.data
                         })
                     }
@@ -590,7 +576,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(() => {
@@ -603,16 +589,16 @@ export default {
                 cancelButtonText: "取消",
                 type: "warning"
             }).then(() => {
-                    if (row.id) {
-                        tradingBox(row.id).then(res => {
-                            this.form.shipItemsList.splice(index, 1);
-                            this.$message.success("操作成功!");
-                        });
-                    } else {
+                if (row.id) {
+                    tradingBox(row.id).then(res => {
                         this.form.shipItemsList.splice(index, 1);
                         this.$message.success("操作成功!");
-                    }
+                    });
+                } else {
+                    this.form.shipItemsList.splice(index, 1);
+                    this.$message.success("操作成功!");
                 }
+            }
             );
         },
         rowSave(form, done, loading) {
@@ -623,6 +609,18 @@ export default {
             console.log(form)
             done(form);
         },
+        handlePrint() {
+            const salesDetail = this.form.orderItemsList;
+            // 调用 Avue 的打印方法
+            this.$print({
+                title: '销售明细打印', // 打印页面的标题
+                printBody: [
+                    // 构建打印内容,可以根据实际需求进行调整
+                    { type: 'html', value: '<h1>销售明细</h1>' },
+                    { type: 'table', value: salesDetail }
+                ]
+            });
+        },
         //自定义列保存
         async saveColumnTwo(ref, option, optionBack, code) {
             /**

+ 26 - 36
src/views/tirePartsMall/salesManagement/outboundTask/index.vue

@@ -1,25 +1,14 @@
 <template>
   <div>
     <basic-container v-show="!detailsOpen">
-      <avue-crud
-          :option="option"
-          :search.sync="search"
-          v-model="form"
-          :table-loading="loading"
-          :data="dataList"
-          ref="crud"
-          :key="key"
-          @selection-change="selectionChange"
-          @on-load="onLoad"
-          @search-change="searchChange"
-          @row-del="rowDel"
-          @refresh-change="refreshChange"
-          @resetColumn="resetColumnTwo('crud','option','optionList',271)"
-          @saveColumn="saveColumnTwo('crud','option','optionList',271)"
-          :page.sync="page">
+      <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
+        ref="crud" :key="key" @selection-change="selectionChange" @on-load="onLoad" @search-change="searchChange"
+        @row-del="rowDel" @refresh-change="refreshChange" @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 271)"
+        @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 271)" :page.sync="page">
         <template slot-scope="{type,size,row,index}" slot="menu">
           <!--<el-button icon="el-icon-view" :size="size" :type="type" @click="check(row)">查看</el-button>-->
-          <el-button icon="el-icon-delete" :disabled="row.statusName === '已派工'" :size="size" :type="type" @click="$refs.crud.rowDel(row,index)">删除
+          <el-button icon="el-icon-delete" :disabled="row.statusName === '已派工'" :size="size" :type="type"
+            @click="$refs.crud.rowDel(row, index)">删除
           </el-button>
         </template>
         <template slot="corpNameSearch">
@@ -29,7 +18,7 @@
           <!--  <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新增</el-button>-->
           <!--  <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>-->
           <el-button type="success" icon="el-icon-finished" size="small" @click="dispatching"
-                     :disabled="selectionList.length <= 0">派工
+            :disabled="selectionList.length <= 0">派工
           </el-button>
         </template>
       </avue-crud>
@@ -39,7 +28,7 @@
 </template>
 
 <script>
-import {getList, remove, outboundWorkOrder} from "@/api/tirePartsMall/salesManagement/outboundTask";
+import { getList, remove, outboundWorkOrder } from "@/api/tirePartsMall/salesManagement/outboundTask";
 import da from "element-ui/src/locale/lang/da";
 // import detailsPage from "./detailsPage"
 
@@ -101,18 +90,18 @@ export default {
           width: 140,
           overHidden: true,
         }
-        // , {
-        //     label: "商品种类",
-        //     prop: "corpId",
-        //     width: 100,
-        //     overHidden: true,
-        // }
-        , {
+          // , {
+          //     label: "商品种类",
+          //     prop: "corpId",
+          //     width: 100,
+          //     overHidden: true,
+          // }
+          , {
           label: '业务来源',
           prop: "bsType",
           width: 100,
           overHidden: true,
-        }, 
+        },
         // {
         //   label: '来源公司',
         //   prop: "sourceCompanyId",
@@ -136,20 +125,20 @@ export default {
           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,
@@ -172,7 +161,7 @@ export default {
         }, {
           label: '业务日期',
           prop: "createTime",
-          searchProp:"createTimeList",
+          searchProp: "createTimeList",
           type: "date",
           overHidden: true,
           search: true,
@@ -215,13 +204,16 @@ export default {
         for (let item of this.selectionList) {
           data.push(item.id)
         }
+        this.loading = true; // Show the loading spinner
         outboundWorkOrder(data.join(',')).then(res => {
           this.$message({
             type: 'success',
             message: '生成成功!'
           });
           this.onLoad(this.page)
-        })
+        }).finally(() => {
+          this.loading = false; // Hide the loading spinner
+        });
       })
     },
     check(row) {
@@ -305,6 +297,4 @@ export default {
 }
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 82 - 46
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -3,25 +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="success"
-            size="small"
-            v-if="form.statusName == '待出库'"
-            @click="complete">出库完成
+        <el-button class="el-button--small-yh" type="success" size="small" v-if="form.statusName == '待出库'"
+          @click="complete">出库完成
         </el-button>
       </div>
     </div>
@@ -33,42 +25,35 @@
         <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.shipItemsList"
-                       :key="key"
-                       @row-save="rowSave"
-                       @row-update="rowUpdate"
-                       @resetColumn="resetColumnTwo('formContacts','optionContacts','optionContactsBack',270.1)"
-                       @saveColumn="saveColumnTwo('formContacts','optionContacts','optionContactsBack',270.1)">
+              :key="key" @row-save="rowSave" @row-update="rowUpdate"
+              @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 270.1)"
+              @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 270.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)">删除
+                  @click="rowDelBox(row, index)">删除
                 </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.shipVOList"
-                       :key="key"
-                       @row-save="rowSave"
-                       @row-update="rowUpdate"
-                       @resetColumn="resetColumnTwo('payment_details','optionPaymentDetails','optionPaymentDetailsBack',270.2)"
-                       @saveColumn="saveColumnTwo('payment_details','optionPaymentDetails','optionPaymentDetailsBack',270.2)">
+            <avue-crud :option="optionPaymentDetails" v-model="formContacts" ref="payment_details" :data="form.shipVOList"
+              :key="key" @row-save="rowSave" @row-update="rowUpdate"
+              @resetColumn="resetColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 270.2)"
+              @saveColumn="saveColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 270.2)">
             </avue-crud>
           </el-tab-pane>
           <el-tab-pane label="历史记录" name="outbound_records">
             <avue-crud :option="optionOutboundRecords" v-model="formContacts" ref="outbound_records"
-                       :data="form.historyList"
-                       :key="key"
-                       @row-save="rowSave"
-                       @row-update="rowUpdate"
-                       @resetColumn="resetColumnTwo('outbound_records','optionOutboundRecords','optionOutboundRecordsBack',270.3)"
-                       @saveColumn="saveColumnTwo('outbound_records','optionOutboundRecords','optionOutboundRecordsBack',270.3)">
+              :data="form.historyList" :key="key" @row-save="rowSave" @row-update="rowUpdate"
+              @resetColumn="resetColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 270.3)"
+              @saveColumn="saveColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 270.3)">
             </avue-crud>
           </el-tab-pane>
         </el-tabs>
@@ -79,7 +64,8 @@
 
 <script>
 
-import {getDetails, tradingBox, submit,warehousingComplete} from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
+import { getDetails, tradingBox, submit, warehousingComplete } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
+import { dateFormat } from "@/util/date";
 
 export default {
   name: "detailsPage",
@@ -139,6 +125,43 @@ export default {
             trigger: "blur"
           }]
         }, {
+          label: '商品数量',
+          prop: "goodsTotalNum",
+          rules: [
+            {
+              required: true,
+              message: " ",
+              trigger: "blur"
+            }
+          ]
+        }, {
+          label: '业务日期',
+          prop: "createTime",
+          type: "datetime",
+          value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
+          format: "yyyy-MM-dd HH:mm",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [
+            {
+              required: true,
+              message: "",
+              trigger: "blur"
+            }
+          ]
+        }, {
+          label: '入库单号',
+          prop: "ordNo",
+          rules: [
+            {
+              required: true,
+              message: " ",
+              trigger: "blur"
+            }
+          ],
+        }, {
+          label: '来源单号',
+          prop: "srcOrdNo"
+        }, {
           label: '备注',
           prop: "remarks",
           type: 'textarea',
@@ -375,7 +398,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(() => {
@@ -388,18 +411,18 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-          if (row.id) {
-            tradingBox(row.id).then(res => {
-              this.form.shipItemsList.splice(index, 1);
-              this.$message.success("操作成功!");
-            });
-          } else {
+        if (row.id) {
+          tradingBox(row.id).then(res => {
             this.form.shipItemsList.splice(index, 1);
             this.$message.success("操作成功!");
-          }
+          });
+        } else {
+          this.form.shipItemsList.splice(index, 1);
+          this.$message.success("操作成功!");
         }
+      }
       )
-      ;
+        ;
     },
     rowSave(form, done, loading) {
       done(form)
@@ -407,6 +430,19 @@ export default {
     rowUpdate(form, index, done, loading) {
       done(form)
     },
+    //打印
+    handlePrint() {
+      const salesDetail = this.form.orderItemsList;
+      // 调用 Avue 的打印方法
+      this.$print({
+        title: '销售明细打印', // 打印页面的标题
+        printBody: [
+          // 构建打印内容,可以根据实际需求进行调整
+          { type: 'html', value: '<h1>销售明细</h1>' },
+          { type: 'table', value: salesDetail }
+        ]
+      });
+    },
     //自定义列保存
     async saveColumnTwo(ref, option, optionBack, code) {
       /**

+ 26 - 13
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -157,7 +157,8 @@ export default {
                     props: {
                         label: "dictValue",
                         value: "dictValue"
-                    }
+                    },
+                    value:'网络支付'
                 }, {
                     label: '联系人',
                     prop: "contacts",
@@ -337,6 +338,7 @@ export default {
                         label: "dot",
                         value: "dot"
                     },
+                    dicUrl: "/api/blade-sales-part/stockDesc/dotList",
                     overHidden: true,
                 },
                 // {
@@ -350,12 +352,13 @@ export default {
                     prop: 'sendNum',
                     overHidden: true,
                     width: 100
-                }, {
-                    label: '毛利',
-                    prop: 'grossProfit',
-                    overHidden: true,
-                    width: 100
                 },
+                //  {
+                //     label: '毛利',
+                //     prop: 'grossProfit',
+                //     overHidden: true,
+                //     width: 100
+                // },
                 // {
                 //   label: '利润',
                 //   prop: 'profit',
@@ -373,12 +376,13 @@ export default {
                 //     overHidden: true,
                 //     width: 100
                 // }, 
-                {
-                    label: '成本',
-                    prop: 'costprie',
-                    overHidden: true,
-                    width: 100
-                }]
+                // {
+                //     label: '成本',
+                //     prop: 'costprie',
+                //     overHidden: true,
+                //     width: 100
+                // }
+            ]
             },
             optionPaymentDetails: {},
             optionPaymentDetailsBack: {
@@ -575,7 +579,16 @@ export default {
         },
         //打印
         handlePrint() {
-            this.$print('formContacts');
+            const salesDetail = this.form.orderItemsList;
+            // 调用 Avue 的打印方法
+            this.$print({
+                title: '销售明细打印', // 打印页面的标题
+                printBody: [
+                    // 构建打印内容,可以根据实际需求进行调整
+                    { type: 'html', value: '<h1>销售明细</h1>' },
+                    { type: 'table', value: salesDetail }
+                ]
+            });
         },
         //自定义列保存
         async saveColumnTwo(ref, option, optionBack, code) {