cz 1 год назад
Родитель
Сommit
629fbafd1d

+ 1 - 1
.env.development

@@ -9,4 +9,4 @@ VITE_APP_BASE_API = '/dev-api'
 
 VITE_APP_WS_API = '/test-api'
 
-VITE_APP_IP = '121.37.194.75'
+VITE_APP_IP = '139.9.102.170'

+ 1 - 1
.env.production

@@ -12,4 +12,4 @@ VITE_APP_WS_API = '/prod-api'
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip
 
-VITE_APP_IP = '139.159.251.109'
+VITE_APP_IP = '139.9.102.170'

+ 1 - 1
.env.staging

@@ -12,4 +12,4 @@ VITE_APP_WS_API = '/test-api'
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip
 
-VITE_APP_IP = '121.37.194.75'
+VITE_APP_IP = '139.9.102.170'

+ 1 - 1
src/components/PDF/contractPDFOne.vue

@@ -112,7 +112,7 @@
               v-if="item.fileList && item.fileList.length > 0"
             />
           </td>
-          <td style="width: 20%">{{ item.productRemark }}</td>
+          <td style="width: 20%"><div v-html="item.productRemark"></div></td>
           <td style="width: 15%">{{ item.productSpec }}</td>
           <td style="width: 12%">{{ item.packMethod }}</td>
           <td style="width: 12%">

+ 5 - 5
src/components/PDF/fundsPDF.vue

@@ -319,11 +319,11 @@ onMounted(() => {
         }
         printDetails.value.electronicInvoiceText = electronicInvoiceText;
       });
-      if (res.flowInfoId) {
-        proxy.post("/flowExample/getApprovalRecord", { id: res.flowInfoId }).then((record) => {
-          printDetails.value.recordList = record.recordList;
-        });
-      }
+      // if (res.flowInfoId) {
+      //   proxy.post("/flowExample/getApprovalRecord", { id: res.flowInfoId }).then((record) => {
+      //     printDetails.value.recordList = record.recordList;
+      //   });
+      // }
     });
   }
 });

+ 5 - 3
src/components/contractCom/contractDetails.vue

@@ -20,7 +20,7 @@
           :style="{ color: currentItem.id === i.id ? '#409eff' : '' }"
           @click="handleItemClick(i)"
         >
-          <div v-if="activeName === 'first'">v {{ i.version }}</div>
+          <div v-if="activeName === 'first'">{{ i.code }}</div>
           <div v-if="activeName === 'second'">
             {{ i.code }}
           </div>
@@ -40,7 +40,7 @@
             <ContractPDFOne :rowData="rowData"></ContractPDFOne>
           </div>
           <div v-if="activeName === 'second'">
-            <purchasePDFOne :rowData="rowDataOne"></purchasePDFOne>
+            <PurchasePDFOne :rowData="rowDataOne"></PurchasePDFOne>
           </div>
         </div>
         <div v-else style="padding-left: 300px">暂无数据</div>
@@ -71,7 +71,7 @@
 </template>
 
 <script setup>
-import purchasePDFOne from "@/components/PDF/purchasePDF.vue";
+import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
 import ContractPDFOne from "@/components/PDF/contractPDFOne.vue";
 
 import byTable from "@/components/byTable/index";
@@ -174,6 +174,8 @@ const pushProcessApproval = (row) => {
       processType: 20,
       random: proxy.random(),
       flowName: "销售合同详情",
+      tenantType: "EHSD",
+      businessId: row.id,
     },
   });
   return;

+ 9 - 5
src/components/contractCom/contractDetailsOne.vue

@@ -21,7 +21,8 @@
           @click="handleItemClick(i)"
         >
           <div v-if="activeName === 'first'">
-            v {{ i.version || index + 1 }}
+            <!-- v {{ i.version || index + 1 }} -->
+            {{ props.code }}
           </div>
           <div v-if="activeName === 'second'">
             {{ i.code }}
@@ -42,7 +43,7 @@
             <SamplePDF :rowData="rowData"></SamplePDF>
           </div>
           <div v-if="activeName === 'second'">
-            <purchasePDFOne :rowData="rowDataOne"></purchasePDFOne>
+            <PurchasePDFOne :rowData="rowDataOne"></PurchasePDFOne>
           </div>
         </div>
         <div v-else style="padding-left: 300px">暂无数据</div>
@@ -73,13 +74,14 @@
 </template>
 
 <script setup>
-import purchasePDFOne from "@/components/PDF/purchasePDF.vue";
+import PurchasePDFOne from "@/components/PDF/purchasePDFOne.vue";
 import SamplePDF from "@/components/PDF/samplePDF.vue";
 
 import byTable from "@/components/byTable/index";
 const { proxy } = getCurrentInstance();
 const props = defineProps({
   contractId: String,
+  code: String,
 });
 const activeName = ref("first");
 const currentItem = ref({});
@@ -171,11 +173,13 @@ const pushProcessApproval = (row) => {
   proxy.$router.push({
     path: "/platform_manage/process/processApproval",
     query: {
-      flowKey: "contract_flow",
+      flowKey: "sample_flow",
       id: row.flowId,
       processType: 20,
       random: proxy.random(),
-      flowName: "销售合同详情",
+      flowName: "样品单详情",
+      tenantType: "EHSD",
+      businessId: row.id,
     },
   });
   return;

+ 311 - 291
src/components/notice/index.vue

@@ -1,99 +1,116 @@
 <template>
-	<div class="commons-notice">
-		<el-dialog
-			title="系统公告"
-			v-model="value"
-			width="460px"
-			:align-center="true"
-			:before-close="handleClose"
-		>
-			<div class="title">
-				<!-- {{ data.length == 0 ? '暂无数据' :  data[indexCopy].title}} -->
-			</div>
-			<div
-				class="text-content"
-				v-if="data.length > 0"
-				style="margin-top: 10px"
-			>
-				<h3>{{ data[index].title }}</h3>
-				{{ data[index].businessData }}
-			</div>
-			<template #footer>
-				<span class="dialog-footer">
-					<el-button
-						size="small"
-						@click="index--"
-						:disabled="data.length < 2 || index == 0"
-						>上一条</el-button
-					>
-					<el-button
-						size="small"
-						@click="index++"
-						:disabled="data.length == index + 1"
-						>下一条</el-button
-					>
-					<el-button
-						type="primary"
-						size="small"
-						:disabled="data.length == 0 || data[index].isRead"
-						@click="confirm"
-						>确认已读</el-button
-					>
-					<!-- <span class="more" @click="moreFn">查看更多 &gt;</span> -->
-				</span>
-			</template>
-		</el-dialog>
-		<div
-			class="notice-table-warp"
-			:class="modelValue ? 'notice-table-warp-open' : ''"
-			@click.stop="closeNoticeTableModal"
-		>
-			<div class="notice-table" @click.stop  v-loading="loading" >
-				<div class="tabs">
-					<ul>
-						<li style="padding-left: 0; border: none" @click="pushInfoReq.type = '';getPushInfo()" :class="pushInfoReq.type == '' ? 'active' : ''">
-							全部({{pushInfoReq.total}})
-						</li>
-						<li  @click="pushInfoReq.type = 1;getPushInfo()" :class="pushInfoReq.type == 1 ? 'active' : ''">流程(0)</li>
-						<li  @click="pushInfoReq.type = 2;getPushInfo()" :class="pushInfoReq.type == 2 ? 'active' : ''">业务(0)</li>
-					</ul>
-					<!-- <div class="more">查看更多&gt;</div> -->
-				</div>
-				<el-table :data="noticeData" style="width: 100%">
-					<el-table-column prop="title" label="标题内容" width="250">
-						<template #default="scope">
-							<el-tooltip
-								class="box-item"
-								effect="dark"
-								:content="scope.row.title"
-								placement="top"
-							>
-								<span>{{ scope.row.title.slice(0,12) }}</span><span v-if="scope.row.title.length > 12">..</span>
-							</el-tooltip>
-							
-						</template>
-					</el-table-column>
-					<el-table-column prop="businessType" label="类型" width="120">
-					</el-table-column>
-					<el-table-column prop="address" label="操作">
-						<template #default="scope">
-							<span style="cursor: pointer" @click="readFn(scope)">未读</span>
-						</template>
-					</el-table-column>
-				</el-table>
-				<div class="notice-btn-box" style="margin-top: 20px">
-					<!-- <el-button plain disabled>点击清空</el-button> -->
-					<el-button type="primary" disabled>全部已读</el-button>
-				</div>
-			</div>
-		</div>
-	</div>
+  <div class="commons-notice">
+    <el-dialog
+      title="系统公告"
+      v-model="value"
+      width="460px"
+      :align-center="true"
+      :before-close="handleClose"
+    >
+      <div class="title">
+        <!-- {{ data.length == 0 ? '暂无数据' :  data[indexCopy].title}} -->
+      </div>
+      <div class="text-content" v-if="data.length > 0" style="margin-top: 10px">
+        <h3>{{ data[index].title }}</h3>
+        {{ data[index].businessData }}
+      </div>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button
+            size="small"
+            @click="index--"
+            :disabled="data.length < 2 || index == 0"
+            >上一条</el-button
+          >
+          <el-button
+            size="small"
+            @click="index++"
+            :disabled="data.length == index + 1"
+            >下一条</el-button
+          >
+          <el-button
+            type="primary"
+            size="small"
+            :disabled="data.length == 0 || data[index].isRead"
+            @click="confirm"
+            >确认已读</el-button
+          >
+          <!-- <span class="more" @click="moreFn">查看更多 &gt;</span> -->
+        </span>
+      </template>
+    </el-dialog>
+    <div
+      class="notice-table-warp"
+      :class="modelValue ? 'notice-table-warp-open' : ''"
+      @click.stop="closeNoticeTableModal"
+    >
+      <div class="notice-table" @click.stop v-loading="loading">
+        <div class="tabs">
+          <ul>
+            <li
+              style="padding-left: 0; border: none"
+              @click="
+                pushInfoReq.type = '';
+                getPushInfo();
+              "
+              :class="pushInfoReq.type == '' ? 'active' : ''"
+            >
+              全部({{ pushInfoReq.total }})
+            </li>
+            <li
+              @click="
+                pushInfoReq.type = 1;
+                getPushInfo();
+              "
+              :class="pushInfoReq.type == 1 ? 'active' : ''"
+            >
+              流程(0)
+            </li>
+            <li
+              @click="
+                pushInfoReq.type = 2;
+                getPushInfo();
+              "
+              :class="pushInfoReq.type == 2 ? 'active' : ''"
+            >
+              业务(0)
+            </li>
+          </ul>
+          <!-- <div class="more">查看更多&gt;</div> -->
+        </div>
+        <el-table :data="noticeData" style="width: 100%">
+          <el-table-column prop="title" label="标题内容" width="250">
+            <template #default="scope">
+              <el-tooltip
+                class="box-item"
+                effect="dark"
+                :content="scope.row.title"
+                placement="top"
+              >
+                <span>{{ scope.row.title.slice(0, 12) }}</span
+                ><span v-if="scope.row.title.length > 12">..</span>
+              </el-tooltip>
+            </template>
+          </el-table-column>
+          <el-table-column prop="businessType" label="类型" width="120">
+          </el-table-column>
+          <el-table-column prop="address" label="操作">
+            <template #default="scope">
+              <span style="cursor: pointer" @click="readFn(scope)">未读</span>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="notice-btn-box" style="margin-top: 20px">
+          <!-- <el-button plain disabled>点击清空</el-button> -->
+          <el-button type="primary" disabled>全部已读</el-button>
+        </div>
+      </div>
+    </div>
+  </div>
 </template>
 <script setup>
-import { ElMessageBox, ElNotification,ElMessage } from 'element-plus'
-import {
-  getToken
-} from '@/utils/auth'
+import { ElMessageBox, ElNotification, ElMessage } from "element-plus";
+import { getToken } from "@/utils/auth";
 const { proxy } = getCurrentInstance();
 defineProps({
   modelValue: {
@@ -101,61 +118,60 @@ defineProps({
     default: false,
   },
 });
-const emit = defineEmits(["update:modelValue"],'changeNum');
+const emit = defineEmits(["update:modelValue"], "changeNum");
 const closeNoticeTableModal = () => {
-	emit("update:modelValue", false);
+  emit("update:modelValue", false);
 };
 let noticeData = ref([
-	// {
-	// 	date: '2016-05-02',
-	// 	name: '王小虎',
-	// 	address: '上海市普陀区金沙江路 1518 弄',
-	// },
-	// {
-	// 	date: '2016-05-04',
-	// 	name: '王小虎',
-	// 	address: '上海市普陀区金沙江路 1517 弄',
-	// },
-	// {
-	// 	date: '2016-05-01',
-	// 	name: '王小虎',
-	// 	address: '上海市普陀区金沙江路 1519 弄',
-	// },
-	// {
-	// 	date: '2016-05-03',
-	// 	name: '王小虎',
-	// 	address: '上海市普陀区金沙江路 1516 弄',
-	// },
-])
-let index = ref(0)
-let data = ref([])
-let value = ref(false)
+  // {
+  // 	date: '2016-05-02',
+  // 	name: '王小虎',
+  // 	address: '上海市普陀区金沙江路 1518 弄',
+  // },
+  // {
+  // 	date: '2016-05-04',
+  // 	name: '王小虎',
+  // 	address: '上海市普陀区金沙江路 1517 弄',
+  // },
+  // {
+  // 	date: '2016-05-01',
+  // 	name: '王小虎',
+  // 	address: '上海市普陀区金沙江路 1519 弄',
+  // },
+  // {
+  // 	date: '2016-05-03',
+  // 	name: '王小虎',
+  // 	address: '上海市普陀区金沙江路 1516 弄',
+  // },
+]);
+let index = ref(0);
+let data = ref([]);
+let value = ref(false);
 const moreFn = () => {
-	noticeTableModal.value = true
-}
+  noticeTableModal.value = true;
+};
 
 const readFn = (item) => {
-	commonRead([item.row.id])
-}
-const commonRead = (ids,type) => {
-	proxy.post('/pushInfo/read',{idList:ids}).then(res=>{
-		console.log(res)
-		ElMessage({
-			message: '已读成功',
-			type: 'success',
-		})
-		if(type == 'confirm'){
-			data.value[index].isRead = true
-		}else{
-			getPushInfo()
-		}
-	})
-}
+  commonRead([item.row.id]);
+};
+const commonRead = (ids, type) => {
+  proxy.post("/pushInfo/read", { idList: ids }).then((res) => {
+    console.log(res);
+    ElMessage({
+      message: "已读成功",
+      type: "success",
+    });
+    if (type == "confirm") {
+      data.value[index].isRead = true;
+    } else {
+      getPushInfo();
+    }
+  });
+};
 const confirm = () => {
-	value.value = false
-	commonRead([data.value[index.value].id],'confirm')
-	
-}
+  value.value = false;
+  commonRead([data.value[index.value].id], "confirm");
+};
 // proxy.post('sendMeg/page',{
 // 	pageNum:1,
 // 	pageSize:30,
@@ -164,182 +180,186 @@ const confirm = () => {
 // })
 
 const socketInit = () => {
-	window.ws = new WebSocket(
-		'ws://'+ import.meta.env.VITE_APP_IP +':20001'+ import.meta.env.VITE_APP_WS_API +'/webStock/' +
-			getToken()
-		// 'ws://192.168.1.97:8300/webStock/' + window.localStorage.getItem('token')
-	)
-	//申请一个WebSocket对象,参数是服务端地址,同http协议使用http://开头一样,WebSocket协议的url使用ws://开头,另外安全的WebSocket协议使用wss://开头
-	window.ws.onopen = function () {
-		//当WebSocket创建成功时,触发onopen事件
-		console.log('open')
-	}
-	window.ws.onmessage = function (e) {
-		//当客户端收到服务端发来的消息时,触发onmessage事件,参数e.data包含server传递过来的数据
-		//在data.value前面插入
-		const res = JSON.parse(e.data)
-		console.log(res)
-		
-		
-		if(res.type == 1) {
-			index.value = 0
-			data.value = res.list
-			if(res.list.length > 0) value.value = true
-		}
-		if(res.type == 2) {
-			emit('changeNum',res.count * 1)
-			getPushInfo()
-		}
-		if(res.type == 3) {
-			ElNotification({
-				title: '提示',
-				message: res.title,
-				position: 'bottom-right',
-				duration:0,
-			})
-		}
-		
-	}
-	window.ws.onclose = function (e) {
-		//当客户端收到服务端发送的关闭连接请求时,触发onclose事件
-		console.log('close')
-	}
-	window.ws.onerror = function (e) {
-		//如果出现连接、处理、接收、发送数据失败的时候触发onerror事件
-		console.log(error)
-	}
-}
+  window.ws = new WebSocket(
+    "ws://" +
+      import.meta.env.VITE_APP_IP +
+      ":20001" +
+      import.meta.env.VITE_APP_WS_API +
+      "/webStock/" +
+      getToken()
+    // 'ws://192.168.1.97:8300/webStock/' + window.localStorage.getItem('token')
+  );
+  //申请一个WebSocket对象,参数是服务端地址,同http协议使用http://开头一样,WebSocket协议的url使用ws://开头,另外安全的WebSocket协议使用wss://开头
+  window.ws.onopen = function () {
+    //当WebSocket创建成功时,触发onopen事件
+    console.log("open");
+  };
+  window.ws.onmessage = function (e) {
+    //当客户端收到服务端发来的消息时,触发onmessage事件,参数e.data包含server传递过来的数据
+    //在data.value前面插入
+    const res = JSON.parse(e.data);
+    console.log(res);
+
+    if (res.type == 1) {
+      index.value = 0;
+      data.value = res.list;
+      if (res.list.length > 0) value.value = true;
+    }
+    if (res.type == 2) {
+      emit("changeNum", res.count * 1);
+      getPushInfo();
+    }
+    if (res.type == 3) {
+      ElNotification({
+        title: "提示",
+        message: res.title,
+        position: "bottom-right",
+        duration: 0,
+      });
+    }
+  };
+  window.ws.onclose = function (e) {
+    //当客户端收到服务端发送的关闭连接请求时,触发onclose事件
+    console.log("close");
+  };
+  window.ws.onerror = function (e) {
+    //如果出现连接、处理、接收、发送数据失败的时候触发onerror事件
+    console.log("error");
+  };
+};
 let pushInfoReq = ref({
-	pageNum: 1,
-	pageSize: 5,
-	pushRead: 0,
-	type: '',
-	total:0,
-})
-const loading = ref(false)
+  pageNum: 1,
+  pageSize: 5,
+  pushRead: 0,
+  type: "",
+  total: 0,
+});
+const loading = ref(false);
 const getPushInfo = () => {
-	loading.value = true
-	proxy.post('/pushInfo/page',{
-		pageNum:1,
-		pageSize:5,
-		pushRead:0,
-		type:2,
-	}).then(res=>{
-		noticeData.value = res.rows
-		pushInfoReq.value.total = res.total
-		setTimeout(() => {
-			loading.value = false
-		}, 500);
-	})
-}
-socketInit()
+  loading.value = true;
+  proxy
+    .post("/pushInfo/page", {
+      pageNum: 1,
+      pageSize: 5,
+      pushRead: 0,
+      type: 2,
+    })
+    .then((res) => {
+      noticeData.value = res.rows;
+      pushInfoReq.value.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 500);
+    });
+};
+// socketInit()
 const handleClose = () => {
-	value.value = false
-}
+  value.value = false;
+};
 
 const openBottomBar = (type) => {
-	if (type == 1) {
-		ElNotification({
-			message: '您有一封新的邮件,请注意查收。',
-			type: 'warning',
-			position: 'bottom-right',
-		})
-	} else if (type == 2) {
-		value.value = true
-	} else {
-		noticeTableModal.value = true
-	}
-}
+  if (type == 1) {
+    ElNotification({
+      message: "您有一封新的邮件,请注意查收。",
+      type: "warning",
+      position: "bottom-right",
+    });
+  } else if (type == 2) {
+    value.value = true;
+  } else {
+    noticeTableModal.value = true;
+  }
+};
 </script>
 <style lang="scss">
 .notice-table-warp {
-	position: fixed;
-	right: 0;
-	top: 0;
-	width: 100%;
-	height: 100%;
-	z-index: 1000;
-	background: rgba(0, 0, 0, 0.1);
-	transition: all 0.3s ease-in-out;
-	opacity: 0;
-	display: none;
+  position: fixed;
+  right: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 1000;
+  background: rgba(0, 0, 0, 0.1);
+  transition: all 0.3s ease-in-out;
+  opacity: 0;
+  display: none;
 }
 
 .notice-table-warp-open {
-	opacity: 1;
-	display: block;
+  opacity: 1;
+  display: block;
 }
 .notice-table {
-	position: fixed;
-	right: 2px;
-	top: 52px;
-	padding: 0 20px 20px;
-	width: 500px;
-	background: #fff;
-	box-shadow: 0px 2px 20px 1px rgba(0, 0, 0, 0.1);
-	z-index: 20;
-	.notice-btn-box {
-		text-align: right;
-	}
-	.tabs {
-		display: flex;
-		justify-content: space-between;
-		height: 60px;
-		line-height: 60px;
-		font-size: 14px;
-		font-weight: 400;
-		ul {
-			display: flex;
-			margin: 23px 0;
-			padding: 0;
-			li {
-				list-style: none;
-				padding: 0 20px;
-				cursor: pointer;
-				height: 14px;
-				line-height: 14px;
-				border-left: 1px solid #dcdcdc;
-			}
-			.active {
-				color: #0084ff;
-			}
-		}
-		.more {
-			color: #0084ff;
-			cursor: pointer;
-		}
-	}
+  position: fixed;
+  right: 2px;
+  top: 52px;
+  padding: 0 20px 20px;
+  width: 500px;
+  background: #fff;
+  box-shadow: 0px 2px 20px 1px rgba(0, 0, 0, 0.1);
+  z-index: 20;
+  .notice-btn-box {
+    text-align: right;
+  }
+  .tabs {
+    display: flex;
+    justify-content: space-between;
+    height: 60px;
+    line-height: 60px;
+    font-size: 14px;
+    font-weight: 400;
+    ul {
+      display: flex;
+      margin: 23px 0;
+      padding: 0;
+      li {
+        list-style: none;
+        padding: 0 20px;
+        cursor: pointer;
+        height: 14px;
+        line-height: 14px;
+        border-left: 1px solid #dcdcdc;
+      }
+      .active {
+        color: #0084ff;
+      }
+    }
+    .more {
+      color: #0084ff;
+      cursor: pointer;
+    }
+  }
 }
 </style>
 <style>
 .commons-notice .el-table__row {
-	height: 50px;
+  height: 50px;
 }
 .commons-notice .el-dialog__footer {
-	text-align: left !important;
-	margin-top: 24px;
+  text-align: left !important;
+  margin-top: 24px;
 }
 .commons-notice .more {
-	color: #0084ff;
-	float: right;
-	cursor: pointer;
+  color: #0084ff;
+  float: right;
+  cursor: pointer;
 }
 .commons-notice .el-dialog__header {
-	background: #eeeeee;
+  background: #eeeeee;
 }
 .commons-notice .el-dialog__title {
-	position: relative;
-	padding-left: 30px;
-	color: #333333;
-	font-weight: bold;
+  position: relative;
+  padding-left: 30px;
+  color: #333333;
+  font-weight: bold;
 }
 .commons-notice .el-dialog__title::before {
-	content: ' ';
-	position: absolute;
-	left: 0;
-	top: 0;
-	width: 20px;
-	height: 20px;
-	background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAftJREFUOE+tlT9MU1EUxr9zWwgBI/D6Boh/EnbCRiImMhBCGqNhcnDQrbgRAyxGBgYICzXYDbrB4OBENIaY4GAMrmqc3DQxMrxWNGkH0Hv83m0ptvS1EHqTm/fuO+f+zjn3nHueoGYoIFju7kGXGeTrJOd1qlwqq30HdJdzCwX7GY9+7QsX/yO4Ph66gHb0+EkiUzAyRklnrcHyugirb4jKYj/YlgUcHOlVgJrxLkLMHJVSEOmLAFV/Vt2j8SzUrsh0/ncodEDnmec9BswsYV1Vu1RD6+842zmvUR6vkRcAm0Y+vxR6Ku7MVv3bMFir65nVT/gZDNNgBw1+oM7ACe9DTy0e4GHwQnS5uxedbRs8s1t1w1S7I9O5cRfJU/8j9Ybq6ll9ieLhfdFM7w1IfDsyAacFAkXonySB3gokNhuZhNMDGcLfNIGJXWZ3pDVA+z4EfiXwaouA384GzDApEpEUlzXrgI1Dhn7B4cEITOwCYob1aK40iCYMuVlS1BLAY0GMz8ssWxMNdElpVjaaJ+RZCaJ3GbIXASyXTdPC1udAcK8E8TcJvNO4sJtePfsa/bmbDvIj8QrGTDS8ei6QsDkk/Hl2mpm6zUH0bSliGaU8bBLHQ7XA832CXLDomsORxLUvgDfGTJ2pfcGuc1+6qn1VoK1ssBXoOX8B/wDYqv5bje949AAAAABJRU5ErkJggg==);
+  content: " ";
+  position: absolute;
+  left: 0;
+  top: 0;
+  width: 20px;
+  height: 20px;
+  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAftJREFUOE+tlT9MU1EUxr9zWwgBI/D6Boh/EnbCRiImMhBCGqNhcnDQrbgRAyxGBgYICzXYDbrB4OBENIaY4GAMrmqc3DQxMrxWNGkH0Hv83m0ptvS1EHqTm/fuO+f+zjn3nHueoGYoIFju7kGXGeTrJOd1qlwqq30HdJdzCwX7GY9+7QsX/yO4Ph66gHb0+EkiUzAyRklnrcHyugirb4jKYj/YlgUcHOlVgJrxLkLMHJVSEOmLAFV/Vt2j8SzUrsh0/ncodEDnmec9BswsYV1Vu1RD6+842zmvUR6vkRcAm0Y+vxR6Ku7MVv3bMFir65nVT/gZDNNgBw1+oM7ACe9DTy0e4GHwQnS5uxedbRs8s1t1w1S7I9O5cRfJU/8j9Ybq6ll9ieLhfdFM7w1IfDsyAacFAkXonySB3gokNhuZhNMDGcLfNIGJXWZ3pDVA+z4EfiXwaouA384GzDApEpEUlzXrgI1Dhn7B4cEITOwCYob1aK40iCYMuVlS1BLAY0GMz8ssWxMNdElpVjaaJ+RZCaJ3GbIXASyXTdPC1udAcK8E8TcJvNO4sJtePfsa/bmbDvIj8QrGTDS8ei6QsDkk/Hl2mpm6zUH0bSliGaU8bBLHQ7XA832CXLDomsORxLUvgDfGTJ2pfcGuc1+6qn1VoK1ssBXoOX8B/wDYqv5bje949AAAAABJRU5ErkJggg==);
 }
 </style>

+ 71 - 3
src/components/process/EHSD/Contract.vue

@@ -734,7 +734,7 @@
             :data="formData.data.contractShipmentList"
             style="width: 100%; margin-top: 16px"
           >
-            <el-table-column prop="code" label="商品编码" width="120" />
+            <el-table-column prop="productCode" label="商品编码" width="120" />
             <el-table-column prop="productName" label="商品名称" />
             <el-table-column label="出货日期" width="220">
               <template #default="{ row, $index }">
@@ -1410,7 +1410,7 @@ const selectProduct = (goods) => {
       ];
     }
     formData.data.contractShipmentList.push({
-      code: goods.code,
+      productCode: goods.code,
       productId: goods.id,
       productName: goods.name,
       shipmentTime: "",
@@ -1668,7 +1668,7 @@ const onPreviewFile = (file) => {
 };
 const clickSplit = (item) => {
   formData.data.contractShipmentList.push({
-    code: item.code,
+    productCode: item.code,
     productId: item.productId,
     productName: item.productName,
     shipmentTime: "",
@@ -1682,6 +1682,7 @@ watch(
   props.queryData,
   () => {
     formOption.disabled = judgeStatus();
+    return;
     if (
       props.queryData &&
       ["10", "20", "30"].includes(route.query.processType)
@@ -1714,6 +1715,73 @@ watch(
     deep: true,
   }
 );
+onMounted(() => {
+  formOption.disabled = judgeStatus();
+  if (route.query && route.query.processType) {
+    proxy
+      .post("/contract/detail", { id: route.query.businessId })
+      .then((res) => {
+        if (!res.fileList) {
+          res.fileList = [];
+        }
+        if (!res.packageFileList) {
+          res.packageFileList = [];
+        }
+        res.countryId = res.buyCountryId;
+        res.provinceId = res.buyProvinceId;
+        formData.data = res;
+        proxy
+          .post("/fileInfo/getList", {
+            businessIdList: [route.query.businessId],
+          })
+          .then((fileObj) => {
+            formData.data.fileList = fileObj[route.query.businessId]
+              .filter((x) => x.businessType === "1")
+              .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+            formData.data.packageFileList = fileObj[route.query.businessId]
+              .filter((x) => x.businessType === "2")
+              .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+          });
+        if (
+          formData.data.contractProductList &&
+          formData.data.contractProductList.length > 0
+        ) {
+          for (let i = 0; i < formData.data.contractProductList.length; i++) {
+            const e = formData.data.contractProductList[i];
+            let obj = JSON.parse(e.ehsdJson);
+            e.packMethod = obj.packMethod;
+            e.tradeMethods = obj.tradeMethods;
+          }
+          let ids = formData.data.contractProductList.map((x) => x.productId);
+          proxy
+            .post("/fileInfo/getList", {
+              businessIdList: ids,
+            })
+            .then((fileObj) => {
+              for (
+                let i = 0;
+                i < formData.data.contractProductList.length;
+                i++
+              ) {
+                const e = formData.data.contractProductList[i];
+                for (const key in fileObj) {
+                  if (e.productId === key) {
+                    e.fileList = fileObj[key];
+                    e.fileUrl = e.fileList[0].fileUrl;
+                  }
+                }
+              }
+            });
+        }
+        if (formData.data.countryId) {
+          getCityData(formData.data.countryId, "20");
+        }
+        if (formData.data.provinceId) {
+          getCityData(formData.data.provinceId, "30");
+        }
+      });
+  }
+});
 </script>
 
 <style lang="scss" scoped>

+ 65 - 3
src/components/process/EHSD/Sample.vue

@@ -734,7 +734,7 @@
             :data="formData.data.sampleShipmentList"
             style="width: 100%; margin-top: 16px"
           >
-            <el-table-column prop="code" label="商品编码" width="120" />
+            <el-table-column prop="productCode" label="商品编码" width="120" />
             <el-table-column prop="productName" label="商品名称" />
             <el-table-column label="出货日期" width="220">
               <template #default="{ row, $index }">
@@ -831,6 +831,7 @@ import CustomerProduct from "@/views/EHSD/productLibrary/customerProduct/index";
 import { ElMessage } from "element-plus";
 import selectCity from "@/components/selectCity/index.vue";
 import { useRoute } from "vue-router";
+import { onMounted } from "vue";
 
 const route = useRoute();
 const { proxy } = getCurrentInstance();
@@ -1332,7 +1333,7 @@ const selectProduct = (goods) => {
       ];
     }
     formData.data.sampleShipmentList.push({
-      code: goods.code,
+      productCode: goods.code,
       productId: goods.id,
       productName: goods.name,
       shipmentTime: "",
@@ -1513,6 +1514,7 @@ watch(
   props.queryData,
   () => {
     formOption.disabled = judgeStatus();
+    return;
     if (
       props.queryData &&
       ["10", "20", "30"].includes(route.query.processType)
@@ -1621,7 +1623,7 @@ const onPreviewFile = (file) => {
 };
 const clickSplit = (item) => {
   formData.data.sampleShipmentList.push({
-    code: item.code,
+    productCode: item.code,
     productId: item.productId,
     productName: item.productName,
     shipmentTime: "",
@@ -1631,6 +1633,66 @@ const clickSplit = (item) => {
 const clickDelete = (index) => {
   formData.data.sampleShipmentList.splice(index, 1);
 };
+onMounted(() => {
+  formOption.disabled = judgeStatus();
+  if (route.query && route.query.processType) {
+    proxy.post("/sample/detail", { id: route.query.businessId }).then((res) => {
+      res.sampleShipmentList = res.sampleShipmentLists;
+      if (!res.fileList) {
+        res.fileList = [];
+      }
+      if (!res.packageFileList) {
+        res.packageFileList = [];
+      }
+      formData.data = res;
+      proxy
+        .post("/fileInfo/getList", {
+          businessIdList: [route.query.businessId],
+        })
+        .then((fileObj) => {
+          formData.data.fileList = fileObj[route.query.businessId]
+            .filter((x) => x.businessType === "1")
+            .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+          formData.data.packageFileList = fileObj[route.query.businessId]
+            .filter((x) => x.businessType === "2")
+            .map((x) => ({ raw: x, name: x.fileName, url: x.fileUrl }));
+        });
+      if (
+        formData.data.sampleProductList &&
+        formData.data.sampleProductList.length > 0
+      ) {
+        for (let i = 0; i < formData.data.sampleProductList.length; i++) {
+          const e = formData.data.sampleProductList[i];
+          let obj = JSON.parse(e.ehsdJson);
+          e.packMethod = obj.packMethod;
+          e.tradeMethods = obj.tradeMethods;
+        }
+        let ids = formData.data.sampleProductList.map((x) => x.productId);
+        proxy
+          .post("/fileInfo/getList", {
+            businessIdList: ids,
+          })
+          .then((fileObj) => {
+            for (let i = 0; i < formData.data.sampleProductList.length; i++) {
+              const e = formData.data.sampleProductList[i];
+              for (const key in fileObj) {
+                if (e.productId === key) {
+                  e.fileList = fileObj[key];
+                  e.fileUrl = e.fileList[0].fileUrl;
+                }
+              }
+            }
+          });
+      }
+      if (formData.data.countryId) {
+        getCityData(formData.data.countryId, "20");
+      }
+      if (formData.data.provinceId) {
+        getCityData(formData.data.provinceId, "30");
+      }
+    });
+  }
+});
 </script>
 
 <style lang="scss" scoped>

+ 1 - 1
src/views/EHSD/productLibrary/companyProduct/index.vue

@@ -76,7 +76,7 @@
     <el-dialog
       :title="modalType == 'add' ? '添加产品' : '编辑产品'"
       v-model="dialogVisible"
-      width="600"
+      width="700"
       v-loading="submitLoading"
       destroy-on-close
     >

+ 1 - 1
src/views/EHSD/productLibrary/customerProduct/index.vue

@@ -75,7 +75,7 @@
     <el-dialog
       :title="modalType == 'add' ? '添加产品' : '编辑产品'"
       v-model="dialogVisible"
-      width="600"
+      width="700"
       v-loading="submitLoading"
       destroy-on-close
     >

+ 6 - 1
src/views/EHSD/saleContract/sampleEHSD/index.vue

@@ -152,7 +152,10 @@
       v-model="openDetailsDialog"
       width="1100"
     >
-      <ContractDetailsOne :contractId="currentContractId"></ContractDetailsOne>
+      <ContractDetailsOne
+        :contractId="currentContractId"
+        :code="currentCode"
+      ></ContractDetailsOne>
     </el-dialog>
 
     <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="920">
@@ -715,8 +718,10 @@ const tagClose = (val, item) => {
 };
 
 const currentContractId = ref("");
+const currentCode = ref("");
 const openDetails = (row) => {
   currentContractId.value = row.id;
+  currentCode.value = row.code;
   openDetailsDialog.value = true;
 };
 

+ 356 - 0
src/views/process/dealWith/backlog.vue

@@ -0,0 +1,356 @@
+
+<!-- 2无缓存,只展示代办数据 -->
+<template>
+  <div class="tenant">
+    <!-- <Banner /> -->
+    <div class="content">
+      <byTable
+        :source="sourceList.data"
+        :pagination="sourceList.pagination"
+        :config="config"
+        :loading="loading"
+        highlight-current-row
+        :selectConfig="selectConfig"
+        :table-events="{
+          //element talbe事件都能传
+          select: select,
+        }"
+        @get-list="getList"
+      >
+        <template #slotName="{ item }">
+          {{ item.createTime }}
+        </template>
+      </byTable>
+    </div>
+    <el-dialog
+      :title="modalType == 'add' ? '新增' : '编辑'"
+      v-model="dialogVisible"
+      width="400"
+      v-loading="loading"
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="byform"
+      >
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="large">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="submitForm('byform')"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+    
+  <script setup >
+/* eslint-disable vue/no-unused-components */
+import { ElMessage, ElMessageBox } from "element-plus";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import { computed, defineComponent, ref } from "vue";
+const loading = ref(false);
+const submitLoading = ref(false);
+const dictCommonModal = ref(false);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 3,
+    pageNum: 1,
+    pageSize: 10,
+    status: 1,
+  },
+});
+let dialogVisible = ref(false);
+let roomDialogVisible = ref(false);
+let modalType = ref("add");
+let rules = ref({
+  classifyName: [
+    { required: true, message: "请输入功能模块", trigger: "blur" },
+  ],
+  flowKey: [{ required: true, message: "请输入流程标识", trigger: "blur" }],
+  flowName: [{ required: true, message: "请输入流程名称", trigger: "blur" }],
+});
+const { proxy } = getCurrentInstance();
+const selectConfig = computed(() => {
+  return [
+    {
+      label: "流程类型",
+      prop: "flowInfoId",
+      data: [],
+    },
+  ];
+});
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "流程类型",
+        prop: "flowName",
+      },
+    },
+    {
+      attrs: {
+        label: "流程标题",
+        prop: "title",
+      },
+    },
+
+    {
+      attrs: {
+        label: "流程状态",
+        width: 100,
+        prop: "status",
+      },
+      render(status) {
+        return status == 0 || status == 1
+          ? "待处理"
+          : status == 2
+          ? "已通过"
+          : "已驳回";
+      },
+    },
+    {
+      attrs: {
+        label: "发起人",
+        prop: "createUserName",
+      },
+    },
+    {
+      attrs: {
+        label: "发起时间",
+        prop: "createTime",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "200",
+        align: "right",
+      },
+      // 渲染 el-button,一般用在最后一列。
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: row.status == 0 || row.status == 1 ? "办理" : "查看",
+              type: "primary",
+              text: true,
+              bg: true,
+              disabled: false,
+            },
+            el: "button",
+            click() {
+              if (row.status != 1 && row.status != 0) {
+                proxy.$router.push({
+                  path: "/platform_manage/process/processApproval",
+                  query: {
+                    flowKey: row.flowKey,
+                    id: row.id,
+                    processType: 20,
+                    version: row.version,
+                    businessId: row.businessId,
+                  },
+                });
+                return;
+              }
+              proxy
+                .post("flowExample/getApprovalRecord", { id: row.id })
+                .then((res) => {
+                  if (res.recordList.length > 0) {
+                    let data = res.recordList.filter(
+                      (item) => item.status === 2
+                    );
+                    let nodeType = 0;
+                    if (data && data.length > 0) {
+                      nodeType = data[0].nodeType;
+                    }
+                    proxy.$router.push({
+                      path: "/platform_manage/process/processApproval",
+                      query: {
+                        flowKey: row.flowKey,
+                        id: row.id,
+                        processType: nodeType == 1 ? 30 : 10,
+                        businessId: row.businessId,
+                        version: row.version,
+                      },
+                    });
+                  }
+                });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+let dtlData = reactive({
+  data: {},
+});
+let formData = reactive({
+  data: {},
+  treeData: [],
+});
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const byform = ref(null);
+const treeData = ref([]);
+const formConfig = computed(() => {
+  return [
+    {
+      type: "input",
+      prop: "classifyName",
+      label: "功能模块",
+    },
+    {
+      type: "input",
+      prop: "flowKey",
+      label: "流程标识",
+      isHide: modalType.value == "edit",
+    },
+    {
+      type: "input",
+      prop: "flowName",
+      label: "流程名称",
+    },
+  ];
+});
+
+const flowJump = (row, type) => {
+  proxy
+    .post("/flowProcess/jump", {
+      flowId: row.id,
+      handleType: type,
+      version: row.version,
+      data: {},
+    })
+    .then((message) => {
+      console.log(message);
+      if (message) {
+        ElMessage.success("操作成功");
+        getList();
+      }
+    });
+};
+
+const getFlowType = () => {
+  proxy.post("/flowExample/getFlowType").then((message) => {
+    console.log(message);
+    selectConfig.value[0].data = message.map((item) => {
+      return {
+        label: item.flowName,
+        value: item.id,
+      };
+    });
+  });
+};
+getFlowType();
+const getUrlObj = {
+  1: "/flowExample/getToBeProcessedPage",
+  2: "/flowExample/getHaveInitiatedPage",
+  3: "/flowExample/getProcessedPage",
+};
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post(
+      getUrlObj[sourceList.value.pagination.status],
+      sourceList.value.pagination
+    )
+    .then((message) => {
+      console.log(message);
+      sourceList.value.data = message.rows;
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+
+const openModal = () => {
+  dialogVisible.value = true;
+  modalType.value = "add";
+  formData.data = {};
+};
+const selection = ref({
+  data: [],
+});
+const select = (_selection, row) => {
+  selection.value.data = _selection;
+  console.log(_selection.length);
+};
+
+const tree = ref(null);
+const submitTree = () => {
+  proxy
+    .post("/tenantInfo/bindingMenu", {
+      tenantId: selection.value.data[0].tenantId,
+      menuIdList: tree.value.getCheckedKeys(),
+    })
+    .then((res) => {
+      ElMessage({
+        message: "保存成功",
+        type: "success",
+      });
+      roomDialogVisible.value = false;
+    });
+};
+
+const submitForm = () => {
+  byform.value.handleSubmit((valid) => {
+    submitLoading.value = true;
+    proxy.post("/flowInfo/" + modalType.value, formData.data).then((res) => {
+      ElMessage({
+        message: modalType.value == "add" ? "添加成功" : "编辑成功",
+        type: "success",
+      });
+      dialogVisible.value = false;
+      submitLoading.value = false;
+      getList();
+    });
+  });
+};
+
+const getDtl = (row) => {
+  formData.data = { ...row };
+  modalType.value = "edit";
+  dialogVisible.value = true;
+};
+
+const changeStatus = (row) => {
+  modalType.value = "edit";
+  proxy
+    .post("/flowInfo/edit", { ...row, status: row.status === 0 ? 1 : 0 })
+    .then((res) => {
+      ElMessage({
+        message: "操作成功",
+        type: "success",
+      });
+      getList();
+    });
+};
+onMounted(() => {
+  const route = useRoute();
+  sourceList.value.pagination.status = route.query.type ? route.query.type : 1;
+  getList();
+});
+</script>
+    
+  <style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+</style>

+ 5 - 8
src/views/process/dealWith/index.vue

@@ -64,7 +64,7 @@ const sourceList = ref({
     total: 3,
     pageNum: 1,
     pageSize: 10,
-    status: 1,
+    status: 2,
   },
 });
 let dialogVisible = ref(false);
@@ -90,10 +90,6 @@ const selectConfig = computed(() => {
       prop: "status",
       data: [
         {
-          label: "待处理",
-          value: "1",
-        },
-        {
           label: "已发起",
           value: "2",
         },
@@ -172,8 +168,8 @@ const config = computed(() => {
                     flowKey: row.flowKey,
                     id: row.id,
                     processType: 20,
-                    tenantType: "EHSD",
                     version: row.version,
+                    businessId: row.businessId,
                   },
                 });
                 return;
@@ -195,7 +191,7 @@ const config = computed(() => {
                         flowKey: row.flowKey,
                         id: row.id,
                         processType: nodeType == 1 ? 30 : 10,
-                        tenantType: "EHSD",
+                        businessId: row.businessId,
                         version: row.version,
                       },
                     });
@@ -283,7 +279,8 @@ const getList = async (req) => {
   loading.value = true;
   proxy
     .post(
-      getUrlObj[sourceList.value.pagination.status],
+      getUrlObj[sourceList.value.pagination.status] ||
+        "/flowExample/getHaveInitiatedPage",
       sourceList.value.pagination
     )
     .then((message) => {

+ 16 - 16
src/views/process/processApproval/index.vue

@@ -496,14 +496,14 @@ const handleSubmit = async (_type) => {
             };
           });
           if (route.query.processType == 10 || route.query.processType == 30) {
-            if (_type && _type == 1) {
-              proxy
-                .post("/flowExample/setStartData", {
-                  exampleId: route.query.id,
-                  startData: data,
-                })
-                .then();
-            }
+            // if (_type && _type == 1) {
+            //   proxy
+            //     .post("/flowExample/setStartData", {
+            //       exampleId: route.query.id,
+            //       startData: data,
+            //     })
+            //     .then();
+            // }
             proxy
               .post("/flowProcess/jump", {
                 ...flowForm,
@@ -558,11 +558,11 @@ const skipPage = () => {
     });
     if (flowForm.flowKey == "subscribe_flow") {
       router.replace({
-        path: "/ERP/purchaseManage/subscribe",
+        path: "/ehsd/procurement/subscribe",
       });
     } else if (flowForm.flowKey == "purchase_flow") {
       router.replace({
-        path: "/ERP/purchaseManage/purchase",
+        path: "/ehsd/procurement/purchase",
       });
     } else if (flowForm.flowKey == "sales_return_flow") {
       router.replace({
@@ -675,17 +675,17 @@ onMounted(async () => {
     route.query.processType == 20 ||
     route.query.processType == 30
   ) {
-    await proxy
-      .post("/flowProcess/getStartData", { flowId: route.query.id })
-      .then((res) => {
-        queryData.data = { ...res };
-      });
+    // await proxy
+    //   .post("/flowProcess/getStartData", { flowId: route.query.id })
+    //   .then((res) => {
+    //     queryData.data = { ...res };
+    //   });
   } else {
     queryData.data = { ...route.query };
   }
   flowForm.flowKey = route.query.flowKey;
   flowForm.tenantType = route.query.tenantType;
-  getRecords(route.query.id);
+  // getRecords(route.query.id);
 });
 </script>
 <style>