swq 2 months ago
parent
commit
4f3ebbf6fa
2 changed files with 210 additions and 0 deletions
  1. 45 0
      src/views/enterprise/export .vue
  2. 165 0
      src/views/enterprise/export_work.vue

+ 45 - 0
src/views/enterprise/export .vue

@@ -0,0 +1,45 @@
+
+
+<template>
+
+<div>
+  <div style="display: flex;width: 100%;margin-top: 30px">
+    <div style="margin-left: 5%;width: 30%">
+      <el-button style="margin-right: 2%">项目作业表</el-button>
+      <el-button style="margin-right: 2%">采集二维码</el-button>
+      <el-button>库房备科单</el-button>
+    </div>
+    <div style="margin-left:40%;width: 35%">
+      <span>项目入库选项:</span>
+      <el-radio v-model="radio" label="1" style="margin-left: 2%">显示产品名称</el-radio>
+      <el-radio v-model="radio" label="2" style="margin-left: -2%">附带重复排序</el-radio>
+      <el-button style="margin-left: 2%">导出到项目库</el-button>
+    </div>
+
+  </div>
+  <div>
+    <Export_work></Export_work>
+  </div>
+
+  </div>
+</template>
+
+<script setup>
+import Export_work from "@/views/enterprise/export_work.vue";
+export default {
+  components: {
+    Export_work
+  },
+
+  data () {
+    return {
+      radio: '1'
+    };
+  }
+}
+
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 165 - 0
src/views/enterprise/export_work.vue

@@ -0,0 +1,165 @@
+<template>
+  <div>
+    <div style="width: 80%">
+      <div class="prep-materials" style="margin-top: 5%;margin-left: 10%">
+        <el-row>
+          <el-col :span="24" class="header">xxxx公司2024-01组试验备料单</el-col>
+        </el-row>
+        <el-row class="details">
+          <el-col :span="6">组编码:2024-01</el-col>
+          <el-col :span="6">创建日期:xxxx年xx月xx日</el-col>
+          <el-col :span="6">项目结束日期:xxxx年xx月xx日</el-col>
+          <el-col :span="6">项目组重复:3次</el-col>
+        </el-row>
+        <el-table :data="properties" border style="width: 100%">
+          <el-table-column fixed prop="property" label="序号" width="100"></el-table-column>
+          <el-table-column
+            v-for="(product, index) in products"
+            :key="index"
+            :prop="`value${index}`"
+            :label="product['序号']" width="100">
+          </el-table-column>
+        </el-table>
+        <div style="display: flex;width: 100%">
+          <p style="display:inline-block;width: 20%">实验要求:</p>
+          <el-input
+            type="textarea"
+            autosize
+            placeholder="请输入内容"
+            v-model="textarea" style="display: inline-block;margin-left: -13%;margin-top: 1%">
+          </el-input>
+        </div>
+
+      </div>
+    </div>
+    <div style="width: 80%">
+      <div class="prep-materials" style="margin-top: 5%;margin-left: 10%">
+        <el-row>
+          <el-col :span="24" class="header">组重复排序</el-col>
+        </el-row>
+        <el-table border style="width: 100%;" height="45">
+          <el-table-column fixed label="序号" width="100"></el-table-column>
+          <el-table-column
+            v-for="(product) in products1"
+            :label="product['序号']" width="100">
+          </el-table-column>
+        </el-table>
+        <p style="font-size: 12px;color: red;margin-top: 5px">***第一组数据不可编辑</p>
+<!--        第二组-->
+          <el-table border style="width: 100%;margin-top: 1%" height="45">
+            <el-table-column fixed label="序号" width="100"></el-table-column>
+            <el-table-column
+              v-for="(product) in products2"
+              :label="product['序号']" width="100">
+            </el-table-column>
+          </el-table>
+          <el-tooltip class="item" effect="dark" content="点击后序号将往后顺移一位" placement="right">
+            <el-button @click="shiftData1">移位按钮</el-button>
+          </el-tooltip>
+
+
+        <el-table border style="width: 100%;margin-top: 1%" height="45">
+          <el-table-column fixed label="序号" width="100"></el-table-column>
+          <el-table-column
+            v-for="(product) in products3"
+            :label="product['序号']" width="100">
+          </el-table-column>
+        </el-table>
+        <el-tooltip class="item" effect="dark" content="点击后序号将往后顺移一位" placement="right">
+          <el-button @click="shiftData1">移位按钮</el-button>
+        </el-tooltip>
+        <div style="display: flex;width: 100%">
+          <p style="display:inline-block;width: 20%">重点强调:</p>
+          <el-input
+            type="textarea"
+            autosize
+            placeholder="请输入内容"
+            v-model="textarea" style="display: inline-block;margin-left: -13%;margin-top: 1%">
+          </el-input>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'PrepMaterials',
+  data() {
+    return {
+      textarea: '',
+      products: [
+        { 序号: '01-01', 产品名称: '示例产品1', 产品代码: '001', 实验密度: '5000' },
+        { 序号: '01-02', 产品名称: '示例产品2', 产品代码: '002', 实验密度: '5000' },
+        { 序号: '01-03', 产品名称: '示例产品3', 产品代码: '003', 实验密度: '5000' },
+        { 序号: '01-04', 产品名称: '示例产品4', 产品代码: '004', 实验密度: '5000' }
+      ],
+      products1: [
+        { 序号: '01-01' },
+        { 序号: '01-02' },
+        { 序号: '01-03' },
+        { 序号: '01-04' }
+      ],
+      products2: [
+        { 序号: '01-01' },
+        { 序号: '01-02' },
+        { 序号: '01-03' },
+        { 序号: '01-04' }
+      ],
+      products3: [
+        { 序号: '01-01' },
+        { 序号: '01-02' },
+        { 序号: '01-03' },
+        { 序号: '01-04' }
+      ],
+      materialsAmount: '',
+      selectedUnit: '',
+      auxiliaryMaterial: '',
+      receiverName1: '',
+      receiverPhone1: '',
+      receiverAddress1: '',
+      receiverName2: '',
+      receiverPhone2: '',
+      receiverAddress2: ''
+    };
+  },
+  computed: {
+    properties() {
+      const props = ['产品名称', '产品代码', '实验密度'];
+      return props.map(prop => ({
+        property: prop,
+        ...this.products.reduce((acc, product, index) => ({
+          ...acc,
+          [`value${index}`]: product[prop]
+        }), {})
+      }));
+    }
+  },
+  methods: {
+    shiftData1() {
+      if (this.products2.length > 1) { // 确保数组至少有两个元素
+        const lastItem = this.products2.pop(); // 移除最后一个元素并保存
+        this.products2.unshift(lastItem);      // 将移除的最后一个元素添加到数组的开头
+      }
+    },
+    shiftData2() {
+      if (this.products3.length > 1) { // 确保数组至少有两个元素
+        const lastItem = this.products3.pop(); // 移除最后一个元素并保存
+        this.products3.unshift(lastItem);      // 将移除的最后一个元素添加到数组的开头
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+.header {
+  font-size: 16px;
+  font-weight: bold;
+  margin-bottom: 10px;
+}
+
+.details {
+  margin-bottom: 20px;
+}
+</style>