Forráskód Böngészése

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

001295 1 éve
szülő
commit
ff5b38b6a8

+ 1 - 0
package.json

@@ -57,6 +57,7 @@
     "jsencrypt": "3.0.0-rc.1",
     "lodash": "^4.17.21",
     "nprogress": "0.2.0",
+    "print-js": "^1.6.0",
     "quill": "1.3.7",
     "screenfull": "5.0.2",
     "sortablejs": "1.10.2",

+ 1 - 1
src/api/requisition/basic.js

@@ -209,4 +209,4 @@ export function deleteApplies(data) {
     method: "POST",
     data: data,
   })
-}
+}

+ 2 - 2
src/views/expend/expendMxDetail.vue

@@ -151,7 +151,7 @@
             </el-select>
           </el-form-item>
           <el-form-item label="修改值">
-            <el-input-number clearable size="mini" :min="1" v-model="dialogForm.info"></el-input-number>
+            <el-input-number clearable size="mini" :min="0" v-model="dialogForm.info"></el-input-number>
           </el-form-item>
         </el-form>
         <div slot="footer" class="dialog-footer">
@@ -188,7 +188,7 @@
         <ux-table-column resizable title="是否带量" field="isWhether" align="center" :formatter="hangStatus" />
         <ux-table-column resizable title="服务费率(%)" field="ratio" align="center" edit-render>
           <template v-slot:edit="scope">
-            <el-input-number clearable :disabled="sonDisable" :min="1" size="mini" v-model="scope.row.ratio" @input="changeFei(scope.rowIndex, scope.row)"/>
+            <el-input-number clearable :disabled="sonDisable" :min="0" size="mini" v-model="scope.row.ratio" @input="changeFei(scope.rowIndex, scope.row)"/>
           </template>
         </ux-table-column>
         <ux-table-column resizable title="数量" field="qty" align="center"/>

+ 88 - 71
src/views/material/requisition/columns.js

@@ -1,63 +1,65 @@
 
-export default function useColumns (){
+export default function useColumns() {
 
   const TableColumns = [
-  { item: { key: "createName", title: "创建人" ,width:100, }, attr: {} },
-  { item: { key: "createTime", title: "创建时间" ,width:150,}, attr: {} },
-  { item: { key: "billCode", title: "单据编码" }, attr: {} },
-  
-  {
-    item: { key: "proposerName", title: "申请人",width:100, },
-    attr: { },
-  },
-  { item: { key: "status", title: "单据状态",width:100, }, 
-      attr: {
-        
+    { item: { key: "createName", title: "创建人", width: 100, }, attr: {} },
+    { item: { key: "createTime", title: "创建时间", width: 150, }, attr: {} },
+    { item: { key: "billCode", title: "单据编码", width: 150, }, attr: {} },
+
+    {
+      item: { key: "proposerName", title: "申请人", width: 100, },
+      attr: {},
+    },
+    {
+      item: { key: "status", title: "单据状态", width: 80, },
+      attr: {
+
         is: "el-dict-tag",
         dictName: "documents_status", // 字典名
-      } 
+      }
     },
 
-    { item: { key: "oneClassify", title: "物料一级分类" ,width:150,}, attr: {} },
-    { item: { key: "materialType", title: "物料基本分类" ,width:150,}, attr: {} },
-    { 
-      item: { key: "code", title: "物料编码" }, 
+    { item: { key: "oneClassify", title: "物料一级分类", width: 150, }, attr: {} },
+    { item: { key: "materialType", title: "物料基本分类", width: 150, }, attr: {} },
+    {
+      item: { key: "code", title: "物料编码" },
       attr: {
-   
-      } 
+
+      }
     },
     { item: { key: "name", title: "物料名称" }, attr: {} },
-     { item: { key: "specification", title: "规格" ,width:150,}, attr: {} },
-    { item: { key: "manufacturerName", title: "生产厂家/代理人" ,width:150,}, attr: {} },
-     { item: { key: "registrationNo", title: "注册证号" ,width:150,}, attr: {} },
-    { item: { key: "registrant", title: "注册人" ,width:150,}, attr: {} },
-    { item: { key: "updateTime", title: "最后修改时间" ,width:150,}, attr: {} },
-    { item: { key: "reviewedName", title: "最后审批人" ,width:150,}, attr: {} },
-     { item: { key: "auditTime", title: "最后审批时间" ,width:150,}, attr: {} },
-     { 
-      item:{ key: "approveUser", title: "当前审批人" ,},
-      attr:{
+    { item: { key: "specification", title: "规格", width: 150, }, attr: {} },
+    { item: { key: "model", title: "型号", width: 150, }, attr: {}, },
+    { item: { key: "manufacturerName", title: "生产厂家/代理人", width: 150, }, attr: {} },
+    { item: { key: "registrationNo", title: "注册证号", width: 150, }, attr: {} },
+    { item: { key: "registrant", title: "注册人", width: 150, }, attr: {} },
+    { item: { key: "updateTime", title: "最后修改时间", width: 150, }, attr: {} },
+    { item: { key: "reviewedName", title: "最后审批人", width: 150, }, attr: {} },
+    { item: { key: "auditTime", title: "最后审批时间", width: 150, }, attr: {} },
+    {
+      item: { key: "approveUser", title: "当前审批人", },
+      attr: {
       },
     },
-     // { item: { key: "orgName", title: "审批语" ,width:150,}, attr: {} },
+    // { item: { key: "orgName", title: "审批语" ,width:150,}, attr: {} },
 
 
 
 
     // { item: { key: "orgName", title: "所属组织" ,width:150,}, attr: {} },
-   
+
     // { item: { key: "createTime", title: "申请时间",width:150, }, attr: {} },
- 
+
     // {
     //   item: { key: "updateName", title: "最后修改人" ,width:150, },
     //   attr: {  },
     // },
-    
-   
+
+
   ].map(({ item, attr }) => ({
     attr,
-    item: { 
-      ...item, 
+    item: {
+      ...item,
       sortabled: true,
       fixedabled: true,
       filterabled: true,
@@ -70,7 +72,7 @@ export default function useColumns (){
       item: { key: "billCode", title: "单据编码" },
       attr: {
         is: "el-input",
-        clearable:true,
+        clearable: true,
       },
     },
     {
@@ -87,7 +89,7 @@ export default function useColumns (){
         is: "el-popover-select-v2",
         referName: "MATERIAL_PARAM",
         valueKey: "name",
-        clearable:true,
+        clearable: true,
       },
     },
     {
@@ -96,24 +98,39 @@ export default function useColumns (){
         is: "el-popover-select-v2",
         referName: "MATERIAL_PARAM",
         valueKey: "code",
-        clearable:true,
+        clearable: true,
+      },
+    },
+    {
+      item: { key: "materialCodes", title: "物料编码" },
+      attr: {
+        clearable: true,
+        is: "el-input",
+        placeholder: '多物料编码使用 , 隔开',
+      },
+    },
+    {
+      item: { key: "specification", title: "规格" },
+      attr: {
+        clearable: true,
+        is: "el-input",
       },
     },
-   {
-     item: { key: "materialCodes", title: "物料编码" },
-     attr: {
-       clearable: true,
-       is: "el-input",
-       placeholder: '多物料编码使用 , 隔开',
-     },
-   },
+    {
+      item: { key: "model", title: "型号" },
+      attr: {
+        clearable: true,
+        is: "el-input",
+      },
+    },
+
     {
       item: { key: "classifySearchList", title: "品类" },
       attr: {
         is: "el-popover-multiple-tree-select",
         referName: "MATERIALCLASSIFY_PARAM",
         valueKey: "id",
-        clearable:true,
+        clearable: true,
       },
     },
     {
@@ -140,7 +157,7 @@ export default function useColumns (){
     //     clearable: true,
     //   } 
     // },
-    
+
     // {
     //   item: { key: "createTimeString", title: "申请时间" },
     //   attr: {
@@ -172,7 +189,7 @@ export default function useColumns (){
     {
       item: { key: "manufacturerName", title: "生产厂家/代理人" },
       attr: {
-        clearable:true,
+        clearable: true,
         is: "el-popover-select-v2",
         valueKey: "name",
         referName: "MANUFACTURER_PARAM",
@@ -184,52 +201,52 @@ export default function useColumns (){
     {
       item: { key: "registrationNo", title: "注册证号" },
       attr: {
-        clearable:true,
+        clearable: true,
         is: "el-input",
       },
     },
     {
-      item:{
+      item: {
         key: "createTimeString",
         title: "申请时间",
-        span:12,
+        span: 12,
       },
       attr: {
-        clearable:true,
+        clearable: true,
         // is: "el-date-wrapper",
         is: "el-date-picker",
-        type:"daterange",
-        rangeSeparator:"-",
-        startPlaceholder:"开始日期",
-        endPlaceholder:"结束日期",
-        valueFormat:"yyyy-MM-dd",
+        type: "daterange",
+        rangeSeparator: "-",
+        startPlaceholder: "开始日期",
+        endPlaceholder: "结束日期",
+        valueFormat: "yyyy-MM-dd",
       },
     },
-    
+
     {
-      item:{
+      item: {
         key: "auditTimeString",
         title: "审批时间",
-        span:12,
+        span: 12,
       },
       attr: {
-        clearable:true,
+        clearable: true,
         is: "el-date-picker",
-        type:"daterange",
-        rangeSeparator:"-",
-        startPlaceholder:"开始日期",
-        endPlaceholder:"结束日期",
-        valueFormat:"yyyy-MM-dd",
+        type: "daterange",
+        rangeSeparator: "-",
+        startPlaceholder: "开始日期",
+        endPlaceholder: "结束日期",
+        valueFormat: "yyyy-MM-dd",
       },
     },
-    
-  
+
+
   ].map(({ item, attr }) => ({
     attr,
     item: { ...item, hidden: true, span: item.span || 6 },
   }));
 
-  return { TableColumns,SearchColumns }
+  return { TableColumns, SearchColumns }
 
 }
 

+ 12 - 0
src/views/material/requisition/details/index.vue

@@ -860,6 +860,18 @@ export default {
               @change="changeDiCode"
             ></component>
           </template>
+          <!-- 注册证号/备案凭证编号 -->
+          <template slot="registrationNo" slot-scope="scope">
+            <component
+              v-bind="scope.attr"
+              v-model="scope.row[scope.item.key]"
+              :size="$attrs.size"
+              :source.sync="scope.row"
+              :disabled="addType === 'see' || params.sysMaterialApply.isMedicine =='2'"
+              style="width: 100%"
+              @change="changeDiCode"
+            ></component>
+          </template>
         </component>
 
         <!--  -->

+ 48 - 0
src/views/material/requisition/fun-button/pldc/index.vue

@@ -0,0 +1,48 @@
+<script>
+export default {
+  name: "PiLiangDaoChu",
+  props: {
+    selectData: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data() {
+    return {
+      title: "批量导出",
+    };
+  },
+  computed: {
+    disabled: {
+      get() {
+        let { selectData } = this.$props;
+
+        if (selectData.length > 0) {
+          return false;
+        }
+        return true;
+      },
+      set() {},
+    },
+  },
+  methods: {
+    async onClick() {
+      try {
+        let ids = this.$props.selectData.map((item) => item.id);
+        console.log(ids, "ids");
+        this.download(
+          "/system/apply/material/exportApplies",
+          { ids },
+          `物料申请单${new Date().getTime()}.xlsx`
+        );
+      } catch (error) {}
+    },
+  },
+  created() {},
+};
+</script>
+<template>
+  <el-button @click="onClick" :disabled="disabled" :size="$attrs.size">
+    {{ title }}
+  </el-button>
+</template>

+ 0 - 0
src/views/material/requisition/fun-button/pi-liang-shan-chu/index.vue → src/views/material/requisition/fun-button/plsc/index.vue


+ 8 - 1
src/views/material/requisition/index.vue

@@ -21,7 +21,8 @@ export default {
     ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
     ElSuperSearch: () => import("@/components/super-search/index.vue"),
     BatchImport: () => import("@/components/BatchImport/index.vue"),
-    plscButton: () => import("./fun-button/pi-liang-shan-chu/index.vue"),
+    plscButton: () => import("./fun-button/plsc/index.vue"),
+    pldcButton: () => import("./fun-button/pldc/index.vue"),
   },
   data() {
     const { SearchColumns, TableColumns } = useColumns();
@@ -285,6 +286,12 @@ export default {
           :select-data="selectData"
           @success="useQuery(params, page)"
         ></plsc-button>
+
+        <pldc-button
+          :size="size"
+          :select-data="selectData"
+          @success="useQuery(params, page)"
+        ></pldc-button>
       </el-col>
     </el-row>
 

+ 10 - 0
src/views/purchase/DemandSummary/add/index.vue

@@ -125,6 +125,14 @@ export default {
       row.deliveryAllocation = null;
       row.deliveryAllocationName = null;
     },
+    // 仓库
+    changeDeliveryWarehouse(prop, row) {
+      this.clearDeliveryWarehouse(row);
+    },
+    clearDeliveryWarehouse(row) {
+      row.deliveryAllocation = null;
+      row.deliveryAllocationName = null;
+    },
   },
   created() {},
 };
@@ -243,6 +251,8 @@ export default {
           :size="$attrs.size"
           :source.sync="scope.row"
           :disabled="!isEdit || scope.row.status !== '1'"
+          @clear="clearDeliveryWarehouse(scope.row)"
+          @change="(val) => changeDeliveryWarehouse(val, scope.row)"
         >
         </component>
       </template>

+ 8 - 2
src/views/purchase/purchase-order/add/column.js

@@ -617,7 +617,10 @@ const PurchaseTabColumns = [
         key: "deliveryDate",
         title: "交货日期",
         inputType: "DatePicker",
-        type: 'date',
+        attr: {
+          type: 'date',
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        },
         // disabled: true,
         isShow: true,
         width: 180,
@@ -1446,7 +1449,10 @@ const CauseTabColumns = [
         key: "deliveryDate",
         title: "交货日期",
         inputType: "DatePicker",
-        type: 'date',
+        attr: {
+          type: 'date',
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        },
         // disabled: true,
         isShow: true,
         width: 180,

+ 2 - 0
src/views/purchase/purchase-order/add/index.vue

@@ -1068,6 +1068,7 @@ export default {
                 :disabled="column.disabled"
                 :picker-options="column.pickerOptions"
                 style="width: 100%"
+                v-bind="column.attr || {}"
               ></el-date-picker>
               <el-checkbox
                 v-if="column.inputType === 'Checkbox'"
@@ -1244,6 +1245,7 @@ export default {
                       :disabled="cColumn.disabled"
                       :picker-options="cColumn.pickerOptions"
                       style="width: 100%"
+                      v-bind="cColumn.attr || {}"
                     ></el-date-picker>
                   </el-form-item>
                 </template>

+ 2 - 0
src/views/purchase/purchase-order/edit/index.vue

@@ -1123,6 +1123,7 @@ export default {
                 :disabled="column.disabled"
                 :picker-options="column.pickerOptions"
                 style="width: 100%"
+                v-bind="column.attr || {}"
               ></el-date-picker>
               <el-checkbox
                 v-if="column.inputType === 'Checkbox'"
@@ -1302,6 +1303,7 @@ export default {
                       :disabled="cColumn.disabled"
                       :picker-options="cColumn.pickerOptions"
                       style="width: 100%"
+                      v-bind="cColumn.attr || {}"
                     ></el-date-picker>
                   </el-form-item>
                 </template>

+ 438 - 0
src/views/purchase/purchase-order/print/index copy.vue

@@ -0,0 +1,438 @@
+<template>
+  <div style="display: inline-block">
+    <el-dropdown
+      size="mini"
+      :disabled="disabled"
+      split-button
+      placement="top-start"
+      @command="onCommand"
+      @click="visible = true"
+    >
+      <span>
+        <i class="el-icon-printer mr-1"></i>
+        打 印
+      </span>
+      <el-dropdown-menu slot="dropdown">
+        <el-dropdown-item command="湖南德荣医疗器械有限公司">
+          湖南德荣医疗器械有限公司
+        </el-dropdown-item>
+        <el-dropdown-item divided command="湖南德荣医疗健康产业有限公司">
+          湖南德荣医疗健康产业有限公司
+        </el-dropdown-item>
+        <el-dropdown-item
+          divided
+          command="湖南德荣医疗器械物流配送服务有限公司"
+        >
+          湖南德荣医疗器械物流配送服务有限公司
+        </el-dropdown-item>
+      </el-dropdown-menu>
+    </el-dropdown>
+
+    <div
+      id="PurchaseOrderPdf"
+      style="
+        position: relative;
+        font-size: 12px;
+        line-height: 1;
+        font-family: '宋体';
+        z-index: -1;
+      "
+    >
+      <!-- width: 210mm; -->
+      <el-row style="position: absolute; display: flex; flex-direction: column">
+        <el-col v-for="item in 2" class="print-content">
+          <div style="position: relative">
+            <img
+              ref="stamp"
+              :src="src"
+              :alt="company"
+              style="
+                width: 130px;
+                height: 130px;
+                position: absolute;
+                top: -5px;
+                left: 10px;
+                z-index: 0;
+              "
+            />
+            <div style="position: relative; z-index: 2">
+              <h1>湖南德荣医疗集团 - 采购订单</h1>
+              <p style="display: flex">
+                <span style="width: 50%"
+                  >甲方(购货方):{{ params.puOrgName }}</span
+                >
+                <span style="width: 25%">订单编号:{{ params.code }}</span>
+                <span style="width: 25%">签订日期:{{ params.billDate }}</span>
+              </p>
+              <p style="display: flex">
+                <!-- <span style="width: 50%">采购部门:{{ params.puDeptName }}</span> -->
+                <span style="width: 50%"
+                  >甲方收票地址:湖南省长沙市开福区湘江北路一段91号德荣医疗物流园1栋14楼集采中心</span
+                >
+                <span style="width: 25%">采购员:{{ params.buyerName }}</span>
+                <!-- <span style="width: 25%">联系方式:{{ params.contactsPhone }}</span> -->
+                <span style="width: 25%">E-mail:{{ params.buyerEmail }}</span>
+              </p>
+              <div style="border-bottom: 1px dashed black"></div>
+              <p style="display: flex">
+                <span style="width: 50%"
+                  >乙方(供货方):{{ params.supplierName }}</span
+                >
+                <span style="width: 25%"
+                  >ATTN:{{ params.supplierContactsName }}</span
+                >
+                <span style="width: 25%"
+                  >E-mail:{{ params.supplierContactsEmail }}</span
+                >
+              </p>
+              <p style="display: flex">
+                <span>甲方收货地址及联系人:{{ params.address }}</span>
+              </p>
+
+              <el-table
+                ref="printTable"
+                show-summary
+                :summary-method="getSummaries"
+                :data="params.orderItemPrintList"
+                style="width: 100%; font-size: 12px; margin-top: 5px"
+              >
+                <el-table-column
+                  prop="materialCode"
+                  label="物料编码"
+                  width="auto"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="materialManufacturersCode"
+                  label="厂家物料编码"
+                  width="auto"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="materialName"
+                  label="物料名称"
+                  width="auto"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="specification"
+                  label="规格/型号"
+                  width="auto"
+                >
+                  <template slot-scope="scope">
+                    {{ scope.row.specification + " " + scope.row.model }}
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  prop="materialRemark"
+                  label="物料备注"
+                  width="auto"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="manufacturerName"
+                  label="生产厂家"
+                  width="auto"
+                >
+                </el-table-column>
+                <el-table-column prop="unitName" label="单位" width="60">
+                </el-table-column>
+                <el-table-column prop="qty" label="数量" width="60">
+                </el-table-column>
+                <el-table-column prop="taxPrice" label="含税单价" width="auto">
+                </el-table-column>
+                <el-table-column prop="money" label="价税合计" width="auto">
+                </el-table-column>
+                <el-table-column
+                  prop="registration"
+                  label="注册证号"
+                  width="auto"
+                >
+                </el-table-column>
+                <el-table-column
+                  prop="deliveryDate"
+                  label="交货日期"
+                  width="auto"
+                >
+                  <template slot-scope="scope">{{
+                    new Date(scope.row.deliveryDate).Format("yyyy-MM-dd")
+                  }}</template>
+                </el-table-column>
+              </el-table>
+              <p>
+                二、质量要求与技术标准:符合供方企业标准、所在行业标准、国家标准。
+              </p>
+              <p>
+                供方承诺若本订单上的货物发生质量问题,按双方签署的《质量保证协议》或其他双方签订的质保条约执行处理。
+              </p>
+              <p>三、交货要求:</p>
+              <p>
+                1.供货方在1个工作日内回复交期(若1个工作日内未回复,视同供货方默认同意接受交货日期)
+              </p>
+              <p>
+                2.常规产品7天内到货,订制产品按双方协议日期交期。交货时,以下纸质资料随货同行,资料所在箱号清晰易见:
+              </p>
+              <p>
+                (1)随货同行单。供货方提供给我公司的随货同行单需包括以下内容:德荣订单编码、供货单位、医疗器械名称、规格(型号)、生产企业、生产企业许可证号(或者备案凭证编号)、注册证号(或者备案凭证编号)、生产批号、有效期、数量、单位、单价、金额、储运条件、收货单位、收货地址、发货日期等内容,并加盖供货单位出库专用章。
+              </p>
+              <p>
+                (2)生产厂家同一批次产品的检验报告。(3)进口物资的报关单和检验检疫证明。
+              </p>
+              <p>
+                3.交货实际时间以供方货物实际到达需方指定地点的时间为准。如遇特殊情况需变更交货时间,供方应事先通知需方并征得需方同意
+              </p>
+              <p>
+                4.运输要求:供货方负责将货物运输到购货方指定地址,运输方式及费用由供货方负责(双方另有书面约定的除外)。发货后供货方提供运输单号给购货方。.需要专业冷链运输的产品,必须按照GSP要求严格执行冷链运输,全程温湿度必须在GSP冷链运输的管控范围内,随货同行的温湿度记录仪的冷链数据须在交付时可导出或打印。
+              </p>
+              <p>
+                四、验收标准:购货方收货后3日内按质量标准进行验收,若有不符应及时通知供货方,供货方应在3日内处理。
+              </p>
+              <p>
+                五、发票要求:供货方根据双方签定的格式合同约定的时间或是于发货后7个工作日内开具符合国家要求的可抵扣的增值税专用发票给购货方。
+              </p>
+              <p>六、结算方式:电汇/转账。</p>
+              <p>
+                七、违约责任:按《中国人民共和国合同法》执行,一方违约,违约方按货款总金额的5‰支付给守约方。
+              </p>
+              <p>
+                八、争议的解决:因履行本合同发生争议,由双方协商解决,协商不成应向长沙仲裁委员会申请仲裁解决。
+              </p>
+              <p>
+                九、本订单作为双方采购合同的有效组成附件,经各采购员发布确认后生效。供方应在接到订单后按采购合同约定的时间内向需方作出反馈,否则需方视为供方默认。
+              </p>
+              <p>
+                十、严禁行贿受贿等一切不合法不合规行为,采购方投诉渠道:电话15386455809;邮箱drpm@derom.com。
+              </p>
+            </div>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+// import print from "vue-print-nb";
+import printJS from "print-js";
+// import { PRINT } from "@/api/business/purchase/task";
+export default {
+  // directives: {
+  //   print,
+  // },
+  name: "",
+  components: {},
+  props: {
+    id: {
+      type: [String, Number],
+      require: true,
+    },
+    value: {
+      type: Object,
+      require: true,
+    },
+  },
+  data() {
+    console.log(this.value, "this.value");
+    return {
+      size: "mini",
+      visible: false,
+      disabled: false,
+      company: "湖南德荣医疗器械有限公司",
+      // print: {
+      //   id: "PurchaseOrderPdf",
+      //   popTitle: "&nbsp;", // 打印配置页上方的标题
+      //   extraHead: "", // 最上方的头部文字,附加在head标签上的额外标签,使用逗号分割
+      //   preview: false, // 是否启动预览模式,默认是false
+      //   previewTitle: "预览的标题", // 打印预览的标题
+      //   previewPrintBtnLabel: "预览结束,开始打印", // 打印预览的标题下方的按钮文本,点击可进入打印
+      //   zIndex: 20002, // 预览窗口的z-index,默认是20002,最好比默认值更高
+      //   previewBeforeOpenCallback() {
+      //     console.log("正在加载预览窗口!");
+      //     console.log(this);
+      //   }, // 预览窗口打开之前的callback
+      //   previewOpenCallback() {
+      //     console.log("已经加载完预览窗口,预览打开了!");
+      //   }, // 预览窗口打开时的callback
+      //   beforeOpenCallback() {
+      //     console.log("开始打印之前!");
+      //   }, // 开始打印之前的callback
+      //   openCallback() {
+      //     console.log("执行打印了!");
+      //   }, // 调用打印时的callback
+      //   closeCallback() {
+      //     console.log("关闭了打印工具!");
+      //   }, // 关闭打印的callback(无法区分确认or取消)
+      //   clickMounted() {
+      //     console.log("点击v-print绑定的按钮了!");
+      //   },
+      //   // url: 'http://localhost:8080/', // 打印指定的URL,确保同源策略相同
+      //   // asyncUrl (reslove) {
+      //   //   setTimeout(() => {
+      //   //     reslove('http://localhost:8080/')
+      //   //   }, 2000)
+      //   // },
+      //   standard: "",
+      //   extarCss: "",
+      // },
+      // params: {},
+      // params: this.value,
+      contentHeight: [],
+    };
+  },
+  computed: {
+    src: {
+      get: function () {
+        return require(`./${this.company}.png`);
+      },
+      set: function () {},
+    },
+    params: {
+      get: function () {
+        return this.value;
+      },
+    },
+  },
+  watch: {},
+  methods: {
+    onCommand(prop) {
+      this.company = prop;
+      this.visible = true;
+      this.handlePrint();
+    },
+    getSummaries(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        const { property } = column;
+        if (index === 0) {
+          sums[index] = "合计";
+          return;
+        }
+        if (property === "qty" || property === "money") {
+          const values = data.map((item) => Number(item[property]));
+          if (!values.every((value) => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return prev + curr;
+              } else {
+                return prev;
+              }
+            }, 0);
+          }
+        }
+      });
+      return sums;
+    },
+    getValue() {
+      this.contentHeight = [];
+      const A4_HEIGHT = 842; //A4纸的高度为842mm
+      const printcontent = document.querySelectorAll(".print-content"); // 获取需要打印的内容元素
+      printcontent.forEach((item) => {
+        this.contentHeight.push(item.offsetHeight);
+      });
+      console.log(this.contentHeight, "this.contentHeight");
+      // const contentHeight = printcontent.offsetHeight; // 获取内容元素的高度
+      // const pagecount = Math.ceil(contentHeight / A4_HEIGHT); // 计算需要打印的页数
+      // const singlePageHeight = contentHeight / pagecount; // 计算单张A4纸的高度
+    },
+    handlePrint() {
+      console.log("新打印");
+      this.$nextTick(() => {
+        printJS({
+          printable: "PurchaseOrderPdf",
+          type: "html",
+          // style: style, // 亦可使用引入的外部css;
+          scanStyles: false,
+          targetStyles: ["*"], //重点  继承原来的样式,没有这个样式就是乱的
+        });
+      });
+    },
+  },
+  async created() {
+    // try {
+    //   this.disabled = true;
+    //   const { data, code } = await PRINT({ id: this.$props.id || 628 });
+    //   if (code === 200) {
+    //     this.params = data;
+    //     this.disabled = false;
+    //   }
+    // } catch (err) {
+    //   alert(err);
+    // } finally {
+    // }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      // if (this.$refs.printTable.$el) {
+      //   let thead = this.$refs.printTable.$el.querySelector(
+      //     ".el-table__header-wrapper thead"
+      //   ); //找到dom节点
+      //   // let img = this.$refs.stamp.cloneNode(true);
+      //   let theadNew = thead.cloneNode(true);
+      //   this.$refs.printTable.$el
+      //     .querySelector(".el-table__body-wrapper table")
+      //     .appendChild(theadNew);
+      // }
+    });
+  },
+  destroyed() {},
+};
+</script>
+
+<style scope>
+/* .el-table >>> .el-table__body-wrapper table thead {
+  display: none;
+} */
+</style>
+<style lang="scss" media="print">
+// 去除打印的页眉页脚
+@page {
+  size: auto; /* auto is the initial value */
+  margin: 3mm; /* this affects the margin in the printer settings */
+}
+// 去除打印的页眉页脚
+
+@media print {
+  #PurchaseOrderPdf {
+    width: 100%;
+  }
+  p {
+    margin: 4px 0;
+  }
+  .el-table > .el-table__header-wrapper > .el-table__header > thead > tr > th,
+  .el-table
+    > .el-table__body-wrapper
+    > .el-table__body
+    > tbody
+    > .el-table__row
+    > td {
+    padding: 0;
+  }
+  table {
+    table-layout: auto !important;
+  }
+  .el-table__header,
+  .el-table__body,
+  .el-table__footer {
+    width: 100% !important;
+    color: #000 !important;
+  }
+  .el-table .cell,
+  .el-table th.el-table__cell > .cell {
+    line-height: 18px !important;
+  }
+  .el-table__footer-wrapper tbody td.el-table__cell,
+  .el-table__header-wrapper tbody td.el-table__cell,
+  .el-table th.el-table__cell > .cell {
+    color: #000 !important;
+  }
+
+  // .el-table > .el-table__header-wrapper {
+  //   display: none;
+  // }
+  // .el-table > .el-table__body-wrapper table thead {
+  //   display: table-header-group;
+  // }
+}
+</style>

+ 35 - 1
src/views/purchase/purchase-order/print/index.vue

@@ -32,6 +32,7 @@
         </el-dropdown-item>
       </el-dropdown-menu>
     </el-dropdown>
+
     <div
       id="PurchaseOrderPdf"
       style="
@@ -44,6 +45,7 @@
     >
       <!-- width: 210mm; -->
       <img
+        ref="stamp"
         :src="src"
         :alt="company"
         style="
@@ -88,6 +90,7 @@
         </p>
 
         <el-table
+          ref="printTable"
           show-summary
           :summary-method="getSummaries"
           :data="params.orderItemPrintList"
@@ -291,6 +294,13 @@ export default {
       });
       return sums;
     },
+    getValue() {
+      const A4_HEIGHT = 842; //A4纸的高度为842mm
+      const printcontent = document.getelementById("print-content"); // 获取需要打印的内容元素
+      const contentHeight = printcontent.offsetHeight; // 获取内容元素的高度
+      const pagecount = Math.ceil(contentHeight / A4_HEIGHT); // 计算需要打印的页数
+      const singlePageHeight = contentHeight / pagecount; // 计算单张A4纸的高度
+    },
   },
   async created() {
     // try {
@@ -305,10 +315,27 @@ export default {
     // } finally {
     // }
   },
-  mounted() {},
+  mounted() {
+    this.$nextTick(() => {
+      let thead = this.$refs.printTable.$el.querySelector(
+        ".el-table__header-wrapper thead"
+      ); //找到dom节点
+      // let img = this.$refs.stamp.cloneNode(true);
+      let theadNew = thead.cloneNode(true);
+      this.$refs.printTable.$el
+        .querySelector(".el-table__body-wrapper table")
+        .appendChild(theadNew);
+    });
+  },
   destroyed() {},
 };
 </script>
+
+<style scope>
+.el-table >>> .el-table__body-wrapper table thead {
+  display: none;
+}
+</style>
 <style lang="scss" media="print">
 // 去除打印的页眉页脚
 @page {
@@ -351,5 +378,12 @@ export default {
   .el-table th.el-table__cell > .cell {
     color: #000 !important;
   }
+
+  .el-table > .el-table__header-wrapper {
+    display: none;
+  }
+  .el-table > .el-table__body-wrapper table thead {
+    display: table-header-group;
+  }
 }
 </style>

+ 2 - 0
src/views/purchase/purchase-order/see/index.vue

@@ -392,6 +392,7 @@ export default {
                 readonly
                 :picker-options="column.pickerOptions"
                 style="width: 100%"
+                v-bind="column.attr || {}"
               ></el-date-picker>
               <el-checkbox
                 v-if="column.inputType === 'Checkbox'"
@@ -544,6 +545,7 @@ export default {
                     :disabled="cColumn.disabled"
                     :picker-options="cColumn.pickerOptions"
                     style="width: 100%"
+                    v-bind="cColumn.attr || {}"
                   ></el-date-picker>
                 </template>
               </ux-table-column>

+ 4 - 0
src/views/purchase/task/columns.js

@@ -16,6 +16,10 @@ export default function useColumns() {
       item: { key: "materialCode", title: "物料编码", width: 120 },
       attr: {},
     },
+    {
+      item: { key: "materialManufacturersCode", title: "厂家物料编码", width: 120, hidden: false, },
+      attr: {},
+    },
     { item: { key: "materialName", title: "物料名称", width: 150 }, attr: {} },
     { item: { key: "specification", title: "规格", width: 100 }, attr: {} },
     {

+ 21 - 4
src/views/spdAddQuestion/add.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="spdAdd">
     <div style="padding:0 0 30px 10px;" v-if="!control">
-      <span>新增问题</span>
+      <!-- <span>新增问题</span> -->
       <el-form :model="basicForm" :rules="basicRules" ref="basic" label-position="left" label-width="auto">
         <el-row :gutter="10">
           <el-col :span="23">
@@ -128,23 +128,34 @@ export default {
       },
       dialogImageUrl: '',
       dialogVisible: false,
-      uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
+      uploadImgUrl: 
+        process.env.NODE_ENV == "development"
+          ? "/drp-file/document-center/fastdfs/upload"
+          : "/document-center/fastdfs/upload", // 上传的图片服务器地址
       headers: {
         Authorization: "Bearer " + getToken(),
       },
     }
   },
+  created() {
+    let phonenumber = this.GetQueryString('phonenumber')
+    let hosName = this.GetQueryString('hosName')
+    let officeName = this.GetQueryString('officeName')
+    if(phonenumber && phonenumber != 'undefined') { this.basicForm.contactInfo = phonenumber }
+    if(hosName && hosName != 'undefined') { this.basicForm.hospital = hosName }
+    if(officeName && officeName != 'undefined') { this.basicForm.department = officeName }
+  },
   methods: {
     successUpload(resp, file, fileList) {
       console.log(fileList)
       this.basicForm.problemPicture = fileList.map((item) => {
-        return item.url
+        return item.response.id
       })
     },
     handleRemove(file, fileList) {
       console.log(fileList)
       this.basicForm.problemPicture = fileList.map((item) => {
-        return item.url
+        return item.response.id
       })
     },
     handlePictureCardPreview(file) {
@@ -202,6 +213,12 @@ export default {
         }
       });
     },
+    //获取url参数
+    GetQueryString(name) {
+      var  reg = new  RegExp( "(^|&)" + name + "=([^&]*)(&|$)()" );
+      var  r = window.location.search.substr(1).match(reg);
+      if (r!= null ) return   decodeURI(r[2]); return  null ;
+    }
   }
 }
 </script>

+ 3 - 3
src/views/spdAddQuestion/index.vue

@@ -1,9 +1,9 @@
 <template>
   <div id="spdIndex">
     <div style="padding:0 0 30px 10px;">
-      <span>新增问题</span>
-      <div style="text-align: center;">
-        <el-button style="width: 150px;" type="primary" size="mini" @click="add()">新 增</el-button>
+      <!-- <span>新增问题</span> -->
+      <div style="text-align: center;margin-top:20px;">
+        <el-button style="width: 150px;" type="primary" size="mini" @click="add()">新增问题</el-button>
       </div>
     </div>
   </div>

+ 1 - 1
vue.config.js

@@ -42,7 +42,7 @@ module.exports = {
         // target: `http://sy.derom.com/drp-admin`, //生产
         // target: `http://172.16.63.202:8000/drp-admin`, // D本地
         // target: `http://172.16.62.241:8000/drp-admin`, //笑寒本地
-        // target: `http://172.16.13.152:8000/drp-admin`, //豪哥本地
+        // target: `http://172.16.60.38:8000/drp-admin`, //豪哥本地
         // target: `http://172.16.13.47:8000/drp-admin`, //这是一个美女的本地
         // target: `http://172.16.13.21:8000/drp-admin`, //CKF本地
         // target: `http://172.16.61.99:8000/drp-admin`, //lz's localhost