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

+ 8 - 8
src/components/PDF/productDemandPDF.vue

@@ -4,13 +4,11 @@
       <div>
         <div class="title">双拓科技有限公司</div>
         <div class="titleTwo">产品要求单</div>
-        <div
-          style="
+        <div style="
             display: flex;
             justify-content: space-between;
             margin-bottom: 10px;
-          "
-        >
+          ">
           <div>签单日期:{{ pdfData.contractCreateTime }}</div>
           <div>交货日期:{{ pdfData.contractDeliveryDate }}</div>
         </div>
@@ -25,6 +23,10 @@
             <td style="width: 10%">数量</td>
             <td style="width: 20%">{{ pdfData.productionQuantity }}</td>
           </tr>
+          <tr>
+            <td style="width: 20%">工单单号</td>
+            <td colspan="3">{{ pdfData.code }}</td>
+          </tr>
 
           <tr>
             <td>
@@ -38,13 +40,11 @@
             </td>
           </tr>
         </table>
-        <div
-          style="
+        <div style="
             display: flex;
             justify-content: space-between;
             margin-top: 10px;
-          "
-        >
+          ">
           <div>业务员:</div>
           <div>地址:</div>
         </div>

+ 80 - 84
src/lang/cn.js

@@ -1,96 +1,92 @@
-
 export const lang = {
-	common:{
+	common: {
 		//提示,取消,确认,请输入关键词,请输入,请选择,请选择日期,请选择时间,搜索,全部,修改,删除,新增,详情,保存,返回,操作,排序,暂无数据,创建时间,添加成功,编辑成功,删除成功,此操作将永久删除该数据, 是否继续?
-		prompt:"提示",
-		cancel:"取消",
-		confirm:"确认",
-		pleaseEnterKeywords:"请输入关键词",
-		pleaseEnter:"请输入",
-		pleaseSelect:"请选择",
-		pleaseSelectDate:"请选择日期",
-		pleaseSelectTime:"请选择时间",
-		search:"搜索",
-		all:"全部",
-		edit:"修改",
-		delete:"删除",
-		add:"新增",
-		details:"详情",
-		save:"保存",
-		return:"返回",
-		operation:"操作",
-		serialNumber:"排序",
-		noData:"暂无数据",
-		createTime:"创建时间",
-		addSuccess:"添加成功",
-		editSuccess:"编辑成功",
-		deleteSuccess:"删除成功",
-		thisOperationWillPermanentlyDeleteTheData:"此操作将永久删除该数据, 是否继续?",
-		
+		prompt: "提示",
+		cancel: "取消",
+		confirm: "确认",
+		pleaseEnterKeywords: "请输入关键词",
+		pleaseEnter: "请输入",
+		pleaseSelect: "请选择",
+		pleaseSelectDate: "请选择日期",
+		pleaseSelectTime: "请选择时间",
+		search: "搜索",
+		all: "全部",
+		edit: "修改",
+		delete: "删除",
+		add: "新增",
+		details: "详情",
+		save: "保存",
+		return: "返回",
+		operation: "操作",
+		serialNumber: "排序",
+		noData: "暂无数据",
+		createTime: "创建时间",
+		addSuccess: "添加成功",
+		editSuccess: "编辑成功",
+		deleteSuccess: "删除成功",
+		thisOperationWillPermanentlyDeleteTheData: "此操作将永久删除该数据, 是否继续?",
+
 
 	},
-	dept:{
+	dept: {
 		//机构名称,机构类型,创建时间,添加机构,租户列表,上级机构,机构名称,机构类型,负责人,总监,请输入用户名,密码,随机生成,请选择上级机构,排序不能为空,机构名称不能为空,机构类型不能为空,公司,业务中心,部门,组
-		deptName:"机构名称",
-		deptType:"机构类型",
-		createTime:"创建时间",
-		addDept:"添加机构",
-		tenantList:"租户列表",
-		parentDept:"上级机构",
-		deptName:"机构名称",
-		deptType:"机构类型",
-		deptManager:"负责人",
-		deptDirector:"总监",
-		pleaseEnterTheUsername:"请输入用户名",
-		pleaseEnterThePassword:"请输入密码",
-		randomGeneration:"随机生成",
-		pleaseSelectTheParentDept:"请选择上级机构",
-		serialNumberCannotBeEmpty:"排序不能为空",
-		deptNameCannotBeEmpty:"机构名称不能为空",
-		deptTypeCannotBeEmpty:"机构类型不能为空",
-		company:"公司",
-		businessCenter:"业务中心",
-		department:"部门",
-		group:"组",
-
-
+		deptName: "机构名称",
+		deptType: "机构类型",
+		createTime: "创建时间",
+		addDept: "添加机构",
+		tenantList: "租户列表",
+		parentDept: "上级机构",
+		deptName: "机构名称",
+		deptType: "机构类型",
+		deptManager: "负责人",
+		deptDirector: "总监",
+		pleaseEnterTheUsername: "请输入用户名",
+		pleaseEnterThePassword: "请输入密码",
+		randomGeneration: "随机生成",
+		pleaseSelectTheParentDept: "请选择上级机构",
+		serialNumberCannotBeEmpty: "排序不能为空",
+		deptNameCannotBeEmpty: "机构名称不能为空",
+		deptTypeCannotBeEmpty: "机构类型不能为空",
+		company: "公司",
+		businessCenter: "业务中心",
+		department: "部门",
+		group: "组",
 	},
-	login:{
+	login: {
 		//欢迎登录,管理系统,租户ID,账号,密码,验证码,请输入租户ID,请输入账号,请输入密码,请输入验证码,记住密码,登录
-		welcomeToLogin:"欢迎登录",
-		managementSystem:"管理系统",
-		tenantId:"租户ID",
-		username:"账号",
-		password:"密码",
-		verificationCode:"验证码",
-		pleaseEnterTheTenantId:"请输入租户ID",
-		pleaseEnterYourAccountNumber:"请输入账号",
-		pleaseEnterYourPassword:"请输入密码",
-		pleaseEnterTheVerificationCode:"请输入验证码",
-		rememberPassword:"记住密码",
-		login:"登录",
-		li1H3:'为中小企业提供数字化管理',
-		li1P:"一站式定制解决方案",
-		li2H3:"物联网筑基,云计算赋能",
-		li2P:"助力企业实现数字化协同",
-		li3H3:"数据驱动,助力决策",
-		li3P:"SaaS定制全套解决方案",
+		welcomeToLogin: "欢迎登录",
+		managementSystem: "管理系统",
+		tenantId: "租户ID",
+		username: "账号",
+		password: "密码",
+		verificationCode: "验证码",
+		pleaseEnterTheTenantId: "请输入租户ID",
+		pleaseEnterYourAccountNumber: "请输入账号",
+		pleaseEnterYourPassword: "请输入密码",
+		pleaseEnterTheVerificationCode: "请输入验证码",
+		rememberPassword: "记住密码",
+		login: "登录",
+		li1H3: '为中小企业提供数字化管理',
+		li1P: "一站式定制解决方案",
+		li2H3: "物联网筑基,云计算赋能",
+		li2P: "助力企业实现数字化协同",
+		li3H3: "数据驱动,助力决策",
+		li3P: "SaaS定制全套解决方案",
 	},
-	header:{
+	header: {
 		//常用功能,功能菜单,编辑功能,个人中心,退出登录,功能导览,更多,待添加功能,布局设置,此目录已添加,此目录需要额外参数,暂不支持添加,确定注销并退出系统吗
-		commonFunctions:"常用功能",
-		functionMenu:"功能菜单",
-		edit:"编辑功能",
-		personalCenter:"个人中心",
-		logout:"退出登录",
-		functionGuide:"功能导览",
-		more:"更多",
-		toAdd:"待添加功能",
-		layoutSettings:"布局设置",
-		thisDirectoryHasBeenAdded:"此目录已添加",
-		thisDirectoryRequiresAdditionalParameters:"此目录需要额外参数,暂不支持添加",
-		areYouSureYouWantToLogOutAndExitTheSystem:"确定注销并退出系统吗",
-
+		commonFunctions: "常用功能",
+		functionMenu: "功能菜单",
+		edit: "编辑功能",
+		personalCenter: "个人中心",
+		logout: "退出登录",
+		functionGuide: "功能导览",
+		more: "更多",
+		toAdd: "待添加功能",
+		layoutSettings: "布局设置",
+		thisDirectoryHasBeenAdded: "此目录已添加",
+		thisDirectoryRequiresAdditionalParameters: "此目录需要额外参数,暂不支持添加",
+		areYouSureYouWantToLogOutAndExitTheSystem: "确定注销并退出系统吗",
 	},
 }
 //导出

+ 1 - 1
src/main.js

@@ -13,7 +13,7 @@ import App from './App'
 import store from './store'
 import router from './router'
 import directive from './directive' // directive
-import './assets/styles/iconfont.js'
+// import './assets/styles/iconfont.js'
 
 
 // 注册指令

+ 1 - 1
src/permission.js

@@ -21,7 +21,7 @@ NProgress.configure({
   showSpinner: false
 });
 // 配置白名单
-const whiteList = ['/login', '/register', '/jxst/pro/qrDetails'];
+const whiteList = ['/login', '/register', '/jxst/pro/qrDetails', '/jxst/pro/materialDetails'];
 
 router.beforeEach((to, from, next) => {
   NProgress.start()

+ 6 - 0
src/router/index.js

@@ -63,6 +63,12 @@ export const constantRoutes = [{
     component: () => import("@/views/JXSK/production/qrDetails/index"),
     hidden: false,
   },
+  // 物料详情
+  {
+    path: "/jxst/pro/materialDetails",
+    component: () => import("@/views/JXSK/materialDetails/index"),
+    hidden: false,
+  },
   {
     path: "",
     component: Layout,

+ 131 - 0
src/views/JXSK/materialDetails/index.vue

@@ -0,0 +1,131 @@
+<template>
+  <div style="width: 100vw; height: 100vh;padding:40px 20px" v-loading="loading" class="bg">
+    <div style=" background-color: rgba(255, 255, 255, 0.9);
+  border-radius: 5px;padding:20px;min-height:calc(100vh - 80px)">
+      <TitleInfo content="物料详情"></TitleInfo>
+      <div style="   margin:15px 0px">
+        物料分类:
+        <div style="margin-top:8px">
+          {{ productData.productClassifyName }}
+        </div>
+      </div>
+      <div style="   margin:15px 0px">
+        物料类型:
+        <div style="margin-top:8px">
+          {{ productData.typeName }}
+        </div>
+      </div>
+      <div style="   margin:15px 0px">
+        物料名称:
+        <div style="margin-top:8px">
+          {{ productData.name }}
+        </div>
+      </div>
+      <div style="   margin:15px 0px">
+        规格型号:
+        <div style="margin-top:8px">
+          {{ productData.spec }}
+        </div>
+      </div>
+      <div style="   margin:15px 0px">
+        条码编号:
+        <div style="margin-top:8px">
+          {{ productData.barCode }}
+        </div>
+      </div>
+      <div style="   margin:15px 0px">
+        单位:
+        <div style="margin-top:8px">
+          {{ productData.unitName ||  productData.unit}}
+        </div>
+      </div>
+      <div style="   margin:15px 0px">
+        备注:
+        <div style="margin-top:8px">
+          {{ productData.remark }}
+        </div>
+      </div>
+      <div style="margin:15px 0px">
+        安全库存:
+        <div style="margin-top:8px">
+          {{ productData.stockThreshold }}
+        </div>
+      </div>
+      <div style="margin:15px 0px">
+        库存:
+        <div style="margin-top:8px">
+          {{ productData.stockQuantity }}
+        </div>
+      </div>
+      <div>
+        图片:
+        <div style="margin-top:8px">
+          <img v-if="productData.fileList && productData.fileList.length>0 " :src="productData.fileList[0].fileUrl" class="pic" />
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import TitleInfo from "@/components/TitleInfo/index.vue";
+import useUserStore from "@/store/modules/user";
+import request from "@/utils/request";
+import QRCode from "qrcodejs2-fix";
+
+const route = useRoute();
+const { proxy } = getCurrentInstance();
+const loading = ref(false);
+const productData = ref({});
+const getData = () => {
+  loading.value = true;
+  request({
+    url: "/open/productInfo/detail",
+    headers: {
+      isToken: false,
+    },
+    method: "post",
+    data: {
+      id: route.query.productId,
+    },
+  }).then((res) => {
+    console.log(res, "asda");
+    productData.value = res.data;
+    loading.value = false;
+  });
+};
+getData();
+onMounted(() => {
+  // nextTick(() => {
+  //   if (route.query && route.query.productSn) {
+  //     proxy.$refs.code.innerHTML = ""; //清除二维码方法一
+  //     new QRCode(proxy.$refs.code, {
+  //       text: route.query.productSn, //页面地址 ,如果页面需要参数传递请注意哈希模式#
+  //       width: 100,
+  //       height: 100,
+  //       colorDark: "#000000",
+  //       colorLight: "#ffffff",
+  //       correctLevel: QRCode.CorrectLevel.H,
+  //     });
+  //   }
+  // });
+});
+</script>
+
+
+
+<style lang="scss" scoped>
+.bg {
+  min-height: 100vh;
+  background-image: url("../../../assets/images/phone-bg.png");
+  background-size: cover;
+}
+
+.pic {
+  object-fit: contain;
+  width: 70px;
+  height: 70px;
+  cursor: pointer;
+  vertical-align: middle;
+}
+</style>

+ 18 - 66
src/views/JXSK/production/plan/index.vue

@@ -1,90 +1,43 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           select: select,
-        }"
-        :onMoreSearch="true"
-        @moreSearch="clickMoreSearch"
-        :action-list="[
+        }" :onMoreSearch="true" @moreSearch="clickMoreSearch" :action-list="[
           {
             text: '添加计划',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加计划' : '查看计划'"
-      v-model="dialogVisible"
-      width="700"
-      v-loading="loading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加计划' : '查看计划'" v-model="dialogVisible" width="700" v-loading="loading" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #list>
           <div style="width: 100%">
             <el-table :data="formData.data.productionTaskList">
               <el-table-column prop="quantity" label="任务数量" />
               <el-table-column prop="personLiableName" label="负责人" />
-              <el-table-column
-                prop="status"
-                label="完成状态"
-                :formatter="(row) => dictValueLabel(row.status, statusData)"
-              />
+              <el-table-column prop="status" label="完成状态" :formatter="(row) => dictValueLabel(row.status, statusData)" />
             </el-table>
           </div>
         </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm()"
-          size="large"
-          :loading="submitLoading"
-          v-if="modalType == 'add'"
-        >
+        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading" v-if="modalType == 'add'">
           确 定
         </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      :title="'高级检索'"
-      v-model="formSearchDialog"
-      width="700"
-      v-loading="loading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formSearchConfig"
-        :formOption="formOption"
-        v-model="sourceList.pagination"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="'高级检索'" v-model="formSearchDialog" width="700" v-loading="loading" destroy-on-close>
+      <byForm :formConfig="formSearchConfig" :formOption="formOption" v-model="sourceList.pagination" :rules="rules" ref="byform">
       </byForm>
       <template #footer>
         <el-button @click="moreSearchReset" size="large">重置</el-button>
-        <el-button @click="moreSearchQuery" type="primary" size="large"
-          >搜索</el-button
-        >
+        <el-button @click="moreSearchQuery" type="primary" size="large">搜索</el-button>
       </template>
     </el-dialog>
   </div>
@@ -249,7 +202,7 @@ const formConfig = computed(() => {
         changeFn(val);
       },
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {
@@ -259,7 +212,7 @@ const formConfig = computed(() => {
       label: "产品名称",
       disabled: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {
@@ -269,7 +222,7 @@ const formConfig = computed(() => {
       label: "规格型号",
       disabled: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
 
@@ -280,7 +233,7 @@ const formConfig = computed(() => {
       label: "待排程数量",
       disabled: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
       isShow: modalType.value == "add",
     },
@@ -291,10 +244,9 @@ const formConfig = computed(() => {
       label: "计划开始时间",
       required: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
-
     {
       type: "date",
       itemType: "date",
@@ -302,7 +254,7 @@ const formConfig = computed(() => {
       label: "计划结束时间",
       required: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {
@@ -313,7 +265,7 @@ const formConfig = computed(() => {
       min: 1,
       controls: false,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {

+ 24 - 83
src/views/JXSK/production/schedule/index.vue

@@ -1,70 +1,32 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :tableHeight="tableHeight"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{}"
-        :action-list="[]"
-        :onMoreSearch="true"
-        @moreSearch="clickMoreSearch"
-        @get-list="getList"
-      >
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{}" :action-list="[]" :onMoreSearch="true" @moreSearch="clickMoreSearch"
+               @get-list="getList">
         <template #finishStatus="{ item }">
           <div>
-            <span
-              style="padding: 4px; color: #fff"
-              :class="[item.finishStatus == 1 ? 'active' : 'disActive']"
-            >
+            <span style="padding: 4px; color: #fff" :class="[item.finishStatus == 1 ? 'active' : 'disActive']">
               {{
                 proxy.dictValueLabel(item.finishStatus, finishStatusData)
-              }}</span
-            >
+              }}</span>
           </div>
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="'高级检索'"
-      v-model="dialogVisible"
-      width="700"
-      v-loading="loading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="sourceList.pagination"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="'高级检索'" v-model="dialogVisible" width="700" v-loading="loading" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="sourceList.pagination" :rules="rules" ref="byform">
       </byForm>
       <template #footer>
         <el-button @click="moreSearchReset" size="large">重置</el-button>
-        <el-button @click="moreSearchQuery" type="primary" size="large"
-          >搜索</el-button
-        >
+        <el-button @click="moreSearchQuery" type="primary" size="large">搜索</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      :title="'查看详情'"
-      v-model="dialogVisibleOne"
-      width="700"
-      destroy-on-close
-    >
+    <el-dialog :title="'查看详情'" v-model="dialogVisibleOne" width="700" destroy-on-close>
       <div>
         <TitleInfo content="生产工序"></TitleInfo>
-        <div
-          v-for="(item, index) in allData"
-          :key="item.id"
-          style="margin-bottom: 20px"
-        >
+        <div v-for="(item, index) in allData" :key="item.id" style="margin-bottom: 20px">
           <div style="margin-top: 5px; font-weight: 700">
             工序名称:{{ item.productionProcessesName }}
           </div>
@@ -77,20 +39,13 @@
           <div style="margin-top: 5px">工序结束时间:{{ item.createTime }}</div>
           <div style="margin-top: 5px">
             完工拍摄:
-            <div
-              class="att-box"
-              v-if="item.fileList && item.fileList.length > 0"
-            >
+            <div class="att-box" v-if="item.fileList && item.fileList.length > 0">
               <div v-for="file in item.fileList" :key="file.id">
                 <div v-if="isImg(file.fileUrl)" @click="handleOpenFile(file)">
                   <img :src="file.fileUrl" alt="" class="img" />
                 </div>
                 <div class="att-item" v-else @click="handleOpenFile(file)">
-                  <img
-                    src="@/assets/images/icon_dz.svg"
-                    style="cursor: pointer"
-                    fit="scale-down"
-                  />
+                  <img src="@/assets/images/icon_dz.svg" style="cursor: pointer" fit="scale-down" />
                   <div class="att-name">
                     {{ file.fileName }}
                   </div>
@@ -110,20 +65,13 @@
               @click="handleOpenFile(file)"
               >{{ file.fileName }}</span
             > -->
-            <div
-              class="att-box"
-              v-if="item.fileListOne && item.fileListOne.length > 0"
-            >
+            <div class="att-box" v-if="item.fileListOne && item.fileListOne.length > 0">
               <div v-for="file in item.fileListOne" :key="file.id">
                 <div v-if="isImg(file.fileUrl)" @click="handleOpenFile(file)">
                   <img :src="file.fileUrl" alt="" class="img" />
                 </div>
                 <div class="att-item" v-else @click="handleOpenFile(file)">
-                  <img
-                    src="@/assets/images/icon_dz.svg"
-                    style="cursor: pointer"
-                    fit="scale-down"
-                  />
+                  <img src="@/assets/images/icon_dz.svg" style="cursor: pointer" fit="scale-down" />
                   <div class="att-name">
                     {{ file.fileName }}
                   </div>
@@ -142,20 +90,13 @@
             @click="handleOpenFile(file)"
             >{{ file.fileName }}</span
           > -->
-          <div
-            class="att-box"
-            v-if="fileData.fileListThree && fileData.fileListThree.length > 0"
-          >
+          <div class="att-box" v-if="fileData.fileListThree && fileData.fileListThree.length > 0">
             <div v-for="file in fileData.fileListThree" :key="file.id">
               <div v-if="isImg(file.fileUrl)" @click="handleOpenFile(file)">
                 <img :src="file.fileUrl" alt="" class="img" />
               </div>
               <div class="att-item" v-else @click="handleOpenFile(file)">
-                <img
-                  src="@/assets/images/icon_dz.svg"
-                  style="cursor: pointer"
-                  fit="scale-down"
-                />
+                <img src="@/assets/images/icon_dz.svg" style="cursor: pointer" fit="scale-down" />
                 <div class="att-name">
                   {{ file.fileName }}
                 </div>
@@ -165,9 +106,7 @@
         </div>
       </div>
       <template #footer>
-        <el-button @click="dialogVisibleOne = false" size="large"
-          >取 消</el-button
-        >
+        <el-button @click="dialogVisibleOne = false" size="large">取 消</el-button>
       </template>
     </el-dialog>
   </div>
@@ -203,11 +142,11 @@ const sourceList = ref({
     getFinishTime: "",
   },
 });
-const tableHeight = ref(0);
-const getTableHeight = () => {
-  tableHeight.value = window.innerHeight - 275;
-};
-getTableHeight();
+// const tableHeight = ref(0);
+// const getTableHeight = () => {
+//   tableHeight.value = window.innerHeight - 275;
+// };
+// getTableHeight();
 const finishStatusData = ref([
   {
     label: "未完成",
@@ -619,9 +558,11 @@ const isImg = (url) => {
 }
 .active {
   background: #a6dd82;
+  border-radius: 4px;
 }
 .disActive {
   background: #fa9841;
+  border-radius: 4px;
 }
 .att-box {
   padding: 8px 0;

+ 35 - 106
src/views/JXSK/production/task/index.vue

@@ -1,86 +1,38 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '添加任务',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加任务' : '查看任务'"
-      v-model="dialogVisible"
-      width="700"
-      v-loading="loading"
-      destroy-on-close
-      :before-close="handleClose"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-        v-if="modalType == 'add'"
-      >
-        <template
-          v-for="(cur, index) in productionProcessesList"
-          :key="cur.id"
-          v-slot:[cur.id]="{ item }"
-        >
-          <el-select
-            v-model="productionObj[cur.id]"
-            multiple
-            placeholder="请选择负责人"
-          >
-            <el-option
-              v-for="item in userList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            />
+    <el-dialog :title="modalType == 'add' ? '添加任务' : '查看任务'" v-model="dialogVisible" width="700" v-loading="loading" destroy-on-close
+               :before-close="handleClose">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform" v-if="modalType == 'add'">
+        <template v-for="(cur, index) in productionProcessesList" :key="cur.id" v-slot:[cur.id]="{ item }">
+          <el-select v-model="productionObj[cur.id]" multiple placeholder="请选择负责人" filterable>
+            <el-option v-for="item in userList" :key="item.value" :label="item.label" :value="item.value" />
           </el-select>
         </template>
       </byForm>
 
-      <byForm
-        :formConfig="formConfigOne"
-        :formOption="formOptionOne"
-        v-model="formData.dataOne"
-        ref="byformOne"
-        v-else
-      >
+      <byForm :formConfig="formConfigOne" :formOption="formOptionOne" v-model="formData.dataOne" ref="byformOne" v-else>
         <template #list>
           <div style="width: 100%">
             <el-table :data="formData.dataOne.productionTaskDetailList">
               <el-table-column prop="productSn" label="产品SN" />
-              <el-table-column
-                prop="productionProcessesName"
-                label="当前工序"
-              />
+              <el-table-column prop="productionProcessesName" label="当前工序" />
               <el-table-column prop="cumulativeTime" label="累计耗时" />
-              <el-table-column
-                label="工序状态"
-                prop="processesStatus"
-                :formatter="
+              <el-table-column label="工序状态" prop="processesStatus" :formatter="
                   (row) =>
                     dictValueLabel(row.processesStatus, processesStatusData)
-                "
-              />
+                " />
             </el-table>
           </div>
         </template>
@@ -88,56 +40,35 @@
 
       <template #footer>
         <el-button @click="handleClose" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm()"
-          size="large"
-          :loading="submitLoading"
-          v-if="modalType == 'add'"
-        >
+        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading" v-if="modalType == 'add'">
           确 定
         </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="打印"
-      v-if="printDialog"
-      v-model="printDialog"
-      width="500"
-    >
-      <div
-        style="height: calc(100vh - 300px); overflow: auto; padding-right: 20px"
-      >
+    <el-dialog title="打印" v-if="printDialog" v-model="printDialog" width="500">
+      <div style="height: calc(100vh - 300px); overflow: auto; padding-right: 20px">
         <div id="pdfDom">
-          <div
-            v-for="item in qrList"
-            :key="item.productSn"
-            style="border: 1px solid #000; padding: 10px; margin-bottom: 20px"
-          >
+          <div v-for="item in qrList" :key="item.productSn" style="border: 1px solid #000; padding: 10px; margin-bottom: 20px">
             <div style="display: flex">
               <div :ref="item.productSn"></div>
-              <div
-                style="
+              <div style="
                   margin-left: 20px;
                   display: flex;
                   padding: 10px 0;
                   flex-direction: column;
                   justify-content: space-between;
-                "
-              >
+                ">
                 <div class="print-row">产品:{{ printData.productName }}</div>
                 <div class="print-row">客户:{{ printData.customerName }}</div>
               </div>
             </div>
-            <div
-              style="
+            <div style="
                 font-size: 14px;
                 font-weight: 700;
                 color: #000;
                 margin-top: 10px;
-              "
-            >
+              ">
               {{ item.productSn }}
             </div>
             <!-- 换页 -->
@@ -148,9 +79,7 @@
 
       <template #footer>
         <el-button @click="printDialog = false" size="large">取 消</el-button>
-        <el-button type="primary" v-print="printObj" size="large"
-          >打 印</el-button
-        >
+        <el-button type="primary" v-print="printObj" size="large">打 印</el-button>
       </template>
     </el-dialog>
   </div>
@@ -309,7 +238,7 @@ const formConfig = computed(() => {
         changeFn(val);
       },
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {
@@ -319,7 +248,7 @@ const formConfig = computed(() => {
       label: "产品名称",
       disabled: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {
@@ -329,7 +258,7 @@ const formConfig = computed(() => {
       label: "规格型号",
       disabled: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {
@@ -339,7 +268,7 @@ const formConfig = computed(() => {
       label: "待排程数量",
       disabled: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {
@@ -350,7 +279,7 @@ const formConfig = computed(() => {
       min: 1,
       controls: false,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {
@@ -360,7 +289,7 @@ const formConfig = computed(() => {
       label: "完成期限",
       required: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
   ];
@@ -378,7 +307,7 @@ const formConfigOne = computed(() => {
         changeFn(val);
       },
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {
@@ -388,7 +317,7 @@ const formConfigOne = computed(() => {
       label: "产品名称",
       disabled: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {
@@ -398,7 +327,7 @@ const formConfigOne = computed(() => {
       label: "规格型号",
       disabled: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {
@@ -408,7 +337,7 @@ const formConfigOne = computed(() => {
       label: "待排程数量",
       disabled: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
       isShow: modalType.value == "add",
     },
@@ -420,7 +349,7 @@ const formConfigOne = computed(() => {
       min: 1,
       controls: false,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {
@@ -430,7 +359,7 @@ const formConfigOne = computed(() => {
       label: "完成期限",
       required: true,
       style: {
-        width: "50%",
+        width: "100%",
       },
     },
     {

+ 97 - 328
src/views/JXSK/production/workOrder/index.vue

@@ -2,25 +2,13 @@
   <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="{
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[]"
-        @get-list="getList"
-      >
+        }" :action-list="[]" @get-list="getList">
         <template #arrangedQuantity="{ item }">
-          <div
-            v-if="Number(item.productionQuantity) > item.arrangedQuantity"
-            style="color: red; font-weight: 700"
-          >
+          <div v-if="Number(item.productionQuantity) > item.arrangedQuantity" style="color: red; font-weight: 700">
             {{ item.arrangedQuantity }}
           </div>
           <div v-else>
@@ -30,127 +18,76 @@
 
         <template #isCustomized="{ item }">
           <div>
-            <span
-              style="padding: 4px"
-              :class="[item.isCustomized == 1 ? 'active' : '']"
-            >
+            <span style="padding: 4px" :class="[item.isCustomized == 1 ? 'active' : '']">
               {{
                 proxy.dictValueLabel(item.isCustomized, isCustomizedData)
-              }}</span
-            >
+              }}</span>
           </div>
         </template>
 
         <template #completionRate="{ item }">
           <div style="width: 100%">
-            <el-progress
-              type="circle"
-              :percentage="Number(item.completionRate)"
-              width="60"
-              :status="Number(item.completionRate) == 100 ? 'success' : ''"
-            />
+            <el-progress type="circle" :percentage="Number(item.completionRate)" width="60"
+                         :status="Number(item.completionRate) == 100 ? 'success' : ''" />
           </div>
         </template>
 
         <template #btns="{ item }">
           <div style="width: 100%">
             <div v-if="props.isShowSelect">
-              <el-button text type="primary" @click="handleSelectRow(item)"
-                >选择</el-button
-              >
+              <el-button text type="primary" @click="handleSelectRow(item)">选择</el-button>
             </div>
             <div v-else>
               <!-- 制图 -->
               <div v-if="isZhiTu && item.researchStatus">
                 <span v-if="item.isCustomized == 1">
-                  <el-button
-                    text
-                    type="primary"
-                    @click="getDtl(item, item.bomStatus ? true : false)"
-                    >{{ item.bomStatus ? "查看" : "调整" }}BOM</el-button
-                  >
+                  <el-button text type="primary"
+                             @click="getDtl(item, item.bomStatus ? true : false)">{{ item.bomStatus ? "查看" : "调整" }}BOM</el-button>
                 </span>
                 <span v-if="item.isCustomized == 1">
-                  <el-button
-                    text
-                    type="primary"
-                    @click="
+                  <el-button text type="primary" @click="
                       getDtlOne(item, item.technologyStatus ? true : false)
-                    "
-                    >{{
+                    ">{{
                       item.technologyStatus ? "查看" : "调整"
-                    }}工艺</el-button
-                  >
+                    }}工艺</el-button>
                 </span>
                 <span v-if="item.productionQuantity == null">
-                  <el-button text type="primary" @click="handleOut(item)"
-                    >下发</el-button
-                  >
+                  <el-button text type="primary" @click="handleOut(item)">下发</el-button>
                 </span>
                 <span>
-                  <el-button text type="primary" @click="handlePrint(item)"
-                    >打印</el-button
-                  >
+                  <el-button text type="primary" @click="handlePrint(item)">打印</el-button>
                 </span>
                 <span>
-                  <el-button
-                    text
-                    type="primary"
-                    @click="handleUploadFile(item, true)"
-                    >查看设计资料</el-button
-                  >
+                  <el-button text type="primary" @click="handleUploadFile(item, true)">查看设计资料</el-button>
                 </span>
               </div>
               <!-- 研发 -->
               <span v-if="isYanFa">
-                <el-button
-                  text
-                  type="primary"
-                  @click="handleUploadFile(item, false)"
-                  >{{
+                <el-button text type="primary" @click="handleUploadFile(item, false)">{{
                     item.researchStatus ? "查看" : "上传"
-                  }}设计资料</el-button
-                >
+                  }}设计资料</el-button>
               </span>
               <!-- 都不是 -->
               <div v-if="!isYanFa && !isZhiTu && item.researchStatus">
                 <span v-if="item.isCustomized == 1">
-                  <el-button
-                    text
-                    type="primary"
-                    @click="getDtl(item, item.bomStatus ? true : false)"
-                    >{{ item.bomStatus ? "查看" : "调整" }}BOM</el-button
-                  >
+                  <el-button text type="primary"
+                             @click="getDtl(item, item.bomStatus ? true : false)">{{ item.bomStatus ? "查看" : "调整" }}BOM</el-button>
                 </span>
                 <span v-if="item.isCustomized == 1">
-                  <el-button
-                    text
-                    type="primary"
-                    @click="
+                  <el-button text type="primary" @click="
                       getDtlOne(item, item.technologyStatus ? true : false)
-                    "
-                    >{{
+                    ">{{
                       item.technologyStatus ? "查看" : "调整"
-                    }}工艺</el-button
-                  >
+                    }}工艺</el-button>
                 </span>
                 <span v-if="item.productionQuantity == null">
-                  <el-button text type="primary" @click="handleOut(item)"
-                    >下发</el-button
-                  >
+                  <el-button text type="primary" @click="handleOut(item)">下发</el-button>
                 </span>
                 <span>
-                  <el-button text type="primary" @click="handlePrint(item)"
-                    >打印</el-button
-                  >
+                  <el-button text type="primary" @click="handlePrint(item)">打印</el-button>
                 </span>
                 <span>
-                  <el-button
-                    text
-                    type="primary"
-                    @click="handleUploadFile(item, true)"
-                    >查看设计资料</el-button
-                  >
+                  <el-button text type="primary" @click="handleUploadFile(item, true)">查看设计资料</el-button>
                 </span>
               </div>
             </div>
@@ -158,69 +95,33 @@
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="!isDetail ? '调整BOM' : '查看BOM'"
-      v-model="dialogVisible"
-      width="60%"
-      v-loading="submitLoading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="!isDetail ? '调整BOM' : '查看BOM'" v-model="dialogVisible" width="60%" v-loading="submitLoading" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #slot>
           <div style="width: 100%">
             <div style="color: red; font-size: 14px">
               注意:这是单个产品的物料
             </div>
-            <el-button type="primary" plain @click="openMaterial = true"
-              >添加物料/半成品</el-button
-            >
+            <el-button type="primary" plain @click="openMaterial = true">添加物料/半成品</el-button>
             <!-- <el-button type="primary" plain> Excel导入</el-button> -->
-            <el-form
-              ref="tableForm"
-              :model="formData.data"
-              :rules="rules"
-              label-width="0px"
-              style="margin-top: 15px"
-              :disabled="formOption.disabled"
-            >
+            <el-form ref="tableForm" :model="formData.data" :rules="rules" label-width="0px" style="margin-top: 15px" :disabled="formOption.disabled">
               <el-table :data="formData.data.workOrderBomList">
                 <el-table-column prop="productCode" label="物料编码" />
                 <el-table-column prop="productName" label="物料名称" />
                 <el-table-column prop="productSpec" label="规格型号" />
-                <el-table-column
-                  prop="productUnit"
-                  label="单位"
-                  :formatter="
+                <el-table-column prop="productUnit" label="单位" :formatter="
                     (row) => dictValueLabel(row.productUnit, materialUnit)
-                  "
-                />
+                  " />
                 <el-table-column prop="quantity" label="数量" width="150">
                   <template #default="{ row, $index }">
-                    <el-form-item
-                      :prop="'workOrderBomList.' + $index + '.quantity'"
-                      :rules="rules.quantity"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.quantity"
-                        :precision="2"
-                        :controls="false"
-                        :min="1"
-                      />
+                    <el-form-item :prop="'workOrderBomList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                      <el-input-number v-model="row.quantity" :precision="2" :controls="false" :min="1" />
                     </el-form-item>
                   </template>
                 </el-table-column>
                 <el-table-column prop="zip" label="操作" width="100">
                   <template #default="{ $index }">
-                    <el-button type="primary" link @click="handleRemove($index)"
-                      >删除</el-button
-                    >
+                    <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -230,60 +131,27 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm(0)"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" @click="submitForm(0)" size="large" :loading="submitLoading">
           暂 存
         </el-button>
-        <el-button
-          type="primary"
-          @click="submitForm(1)"
-          size="large"
-          :loading="submitLoading"
-          v-if="!isDetail"
-        >
+        <el-button type="primary" @click="submitForm(1)" size="large" :loading="submitLoading" v-if="!isDetail">
           提 交
         </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      :title="!isDetailOne ? '调整工艺' : '查看工艺'"
-      v-model="dialogVisibleOne"
-      width="60%"
-      v-loading="loadingOne"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfigOne"
-        :formOption="formOptionOne"
-        v-model="formData.dataOne"
-        :rules="rulesOne"
-        ref="byformOne"
-      >
+    <el-dialog :title="!isDetailOne ? '调整工艺' : '查看工艺'" v-model="dialogVisibleOne" width="60%" v-loading="loadingOne" destroy-on-close>
+      <byForm :formConfig="formConfigOne" :formOption="formOptionOne" v-model="formData.dataOne" :rules="rulesOne" ref="byformOne">
         <template #slot>
           <div style="width: 100%" class="tableDrop">
-            <el-button type="primary" plain @click="clickAdd"
-              >添加工序</el-button
-            >
-            <el-table
-              :data="formData.dataOne.workOrderProductionProcessesList"
-              style="width: 100%; margin-top: 16px"
-              row-key="id"
-            >
+            <el-button type="primary" plain @click="clickAdd">添加工序</el-button>
+            <el-table :data="formData.dataOne.workOrderProductionProcessesList" style="width: 100%; margin-top: 16px" row-key="id">
               <el-table-column label="工序名称" width="150">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="
+                    <el-form-item :prop="
                         'workOrderProductionProcessesList.' + $index + '.name'
-                      "
-                      :rules="rulesOne.name"
-                      :inline-message="true"
-                    >
+                      " :rules="rulesOne.name" :inline-message="true">
                       <el-input v-model="row.name" placeholder="请输入" />
                     </el-form-item>
                   </div>
@@ -292,20 +160,12 @@
               <el-table-column label="工艺说明" width="300">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="
+                    <el-form-item :prop="
                         'workOrderProductionProcessesList.' +
                         $index +
                         '.remarks'
-                      "
-                      :rules="rulesOne.remarks"
-                      :inline-message="true"
-                    >
-                      <el-input
-                        v-model="row.remarks"
-                        type="textarea"
-                        placeholder="请输入"
-                      />
+                      " :rules="rulesOne.remarks" :inline-message="true">
+                      <el-input v-model="row.remarks" type="textarea" placeholder="请输入" />
                     </el-form-item>
                   </div>
                 </template>
@@ -313,58 +173,30 @@
               <el-table-column label="图纸">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="
+                    <el-form-item :prop="
                         'workOrderProductionProcessesList.' + $index + '.name'
-                      "
-                      :rules="rulesOne.name"
-                      :inline-message="true"
-                    >
-                      <el-upload
-                        v-model:fileList="row.fileList"
-                        :show-file-list="false"
-                        class="upload-demo"
-                        action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                        :data="uploadData"
-                        :before-upload="
+                      " :rules="rulesOne.name" :inline-message="true">
+                      <el-upload v-model:fileList="row.fileList" :show-file-list="false" class="upload-demo"
+                                 action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData" :before-upload="
                           (file) => handleBeforeUpload(file, $index)
-                        "
-                      >
-                        <el-icon
-                          :size="17"
-                          style="margin-top: 12px; cursor: pointer"
-                        >
+                        ">
+                        <el-icon :size="17" style="margin-top: 12px; cursor: pointer">
                           <Plus />
                         </el-icon>
                       </el-upload>
 
-                      <div
-                        v-if="row.fileListCopy && row.fileListCopy.length > 0"
-                      >
-                        <el-tag
-                          style="margin-left: 10px"
-                          class="ml-2"
-                          type="info"
-                          v-for="(item, index) in row.fileListCopy"
-                          :key="index"
-                          >{{ item.fileName }}</el-tag
-                        >
+                      <div v-if="row.fileListCopy && row.fileListCopy.length > 0">
+                        <el-tag style="margin-left: 10px" class="ml-2" type="info" v-for="(item, index) in row.fileListCopy"
+                                :key="index">{{ item.fileName }}</el-tag>
                       </div>
                     </el-form-item>
                   </div>
                 </template>
               </el-table-column>
 
-              <el-table-column
-                align="center"
-                label="操作"
-                width="60"
-                fixed="right"
-              >
+              <el-table-column align="center" label="操作" width="60" fixed="right">
                 <template #default="{ $index }">
-                  <el-button type="primary" link @click="clickDelete($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -372,150 +204,68 @@
         </template>
         <template #file>
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="formData.dataOne.fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              multiple
-              :before-upload="handleBeforeUploadOne"
-              :on-success="handleSuccess"
-              :on-preview="onPreviewFile"
-            >
+            <el-upload v-model:fileList="formData.dataOne.fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData"
+                       multiple :before-upload="handleBeforeUploadOne" :on-success="handleSuccess" :on-preview="onPreviewFile">
               <el-button type="primary" plain>选择</el-button>
             </el-upload>
           </div>
         </template>
       </byForm>
       <template #footer>
-        <el-button @click="dialogVisibleOne = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitFormOne(0)"
-          size="large"
-          :loading="loadingOne"
-          v-if="!isDetailOne"
-        >
+        <el-button @click="dialogVisibleOne = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitFormOne(0)" size="large" :loading="loadingOne" v-if="!isDetailOne">
           暂 存
         </el-button>
-        <el-button
-          type="primary"
-          @click="submitFormOne(1)"
-          size="large"
-          :loading="loadingOne"
-          v-if="!isDetailOne"
-        >
+        <el-button type="primary" @click="submitFormOne(1)" size="large" :loading="loadingOne" v-if="!isDetailOne">
           提 交
         </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      :title="'工单下发'"
-      v-model="dialogVisibleTwo"
-      width="500"
-      v-loading="submitLoading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfigTwo"
-        :formOption="formOptionTwo"
-        v-model="formData.dataTwo"
-        :rules="rulesTwo"
-        ref="byformTwo"
-      >
+    <el-dialog :title="'工单下发'" v-model="dialogVisibleTwo" width="500" v-loading="submitLoading" destroy-on-close>
+      <byForm :formConfig="formConfigTwo" :formOption="formOptionTwo" v-model="formData.dataTwo" :rules="rulesTwo" ref="byformTwo">
       </byForm>
       <template #footer>
-        <el-button @click="dialogVisibleTwo = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitFormTwo()"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button @click="dialogVisibleTwo = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitFormTwo()" size="large" :loading="submitLoading">
           提 交
         </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      :title="'上传设计资料'"
-      v-model="informationDialog"
-      width="500"
-      v-loading="submitLoading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="informationFormConfig"
-        :formOption="informationFormOption"
-        v-model="formData.dataThree"
-      >
+    <el-dialog :title="'上传设计资料'" v-model="informationDialog" width="500" v-loading="submitLoading" destroy-on-close>
+      <byForm :formConfig="informationFormConfig" :formOption="informationFormOption" v-model="formData.dataThree">
         <template #file>
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="formData.dataThree.fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :data="uploadData"
-              multiple
-              :before-upload="handleBeforeUploadOne"
-              :on-success="handleSuccess"
-              :on-preview="onPreviewFile"
-            >
+            <el-upload v-model:fileList="formData.dataThree.fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData"
+                       multiple :before-upload="handleBeforeUploadOne" :on-success="handleSuccess" :on-preview="onPreviewFile">
               <el-button>选择</el-button>
             </el-upload>
           </div>
         </template>
       </byForm>
       <template #footer>
-        <el-button @click="informationDialog = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitInformationForm(0)"
-          size="large"
-          :loading="submitLoading"
-          v-if="!showUploadSubmitOne"
-        >
+        <el-button @click="informationDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitInformationForm(0)" size="large" :loading="submitLoading" v-if="!showUploadSubmitOne">
           暂 存
         </el-button>
-        <el-button
-          type="primary"
-          @click="submitInformationForm(1)"
-          size="large"
-          :loading="submitLoading"
-          v-if="!showUploadSubmitOne && !showUploadSubmit"
-        >
+        <el-button type="primary" @click="submitInformationForm(1)" size="large" :loading="submitLoading"
+                   v-if="!showUploadSubmitOne && !showUploadSubmit">
           提 交
         </el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="打印产品需求单"
-      v-if="printDialog"
-      v-model="printDialog"
-      width="680"
-    >
+    <el-dialog title="打印产品需求单" v-if="printDialog" v-model="printDialog" width="680">
       <ProductDemandPDF :rowData="rowData"></ProductDemandPDF>
 
       <template #footer>
         <el-button @click="printDialog = false" size="large">取 消</el-button>
-        <el-button type="primary" v-print="printObj" size="large"
-          >打 印</el-button
-        >
+        <el-button type="primary" v-print="printObj" size="large">打 印</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      v-model="openMaterial"
-      title="选择产品"
-      width="70%"
-      append-to-body
-    >
+    <el-dialog v-model="openMaterial" title="选择产品" width="70%" append-to-body>
       <SelectMaterial @handleSelect="handleSelect"></SelectMaterial>
       <template #footer>
         <span class="dialog-footer">
@@ -591,6 +341,16 @@ const isCustomizedData = ref([
     value: "0",
   },
 ]);
+const isComplete = ref([
+  {
+    label: "已处理",
+    value: "1",
+  },
+  {
+    label: "未处理",
+    value: "0",
+  },
+]);
 const selectConfig = computed(() => [
   {
     label: "工单来源",
@@ -602,6 +362,11 @@ const selectConfig = computed(() => [
     prop: "isCustomized",
     data: isCustomizedData.value,
   },
+  {
+    label: "处理状态",
+    prop: "isComplete",
+    data: isComplete.value,
+  },
 ]);
 
 const config = computed(() => {
@@ -696,6 +461,7 @@ const config = computed(() => {
         slot: "completionRate",
         width: 120,
         align: "center",
+        fixed: "right",
       },
       // render(completionRate) {
       //   if (completionRate !== undefined && completionRate !== "") {
@@ -703,6 +469,7 @@ const config = computed(() => {
       //   }
       // },
     },
+
     {
       attrs: {
         label: "操作",
@@ -1355,8 +1122,10 @@ const handleSelectRow = (row) => {
 .active {
   background: #a6dd82;
   color: #fff;
+  border-radius: 4px;
 }
 .disActive {
   background: #fa9841;
+  border-radius: 4px;
 }
 </style>

+ 64 - 176
src/views/JXSK/salesMange/contract/index.vue

@@ -1,34 +1,29 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '添加合同',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
+        <template #code="{ item }">
+          <div style="width: 100%">
+            <span style="color: #409eff; cursor: pointer" @click="getDtl(item)">{{ item.code }}</span>
+          </div>
+        </template>
+
         <template #remark="{ item }">
           <div style="width: 100%">
             <el-tooltip placement="bottom" effect="dark">
-              <div
-                style="
+              <div style="
                   overflow: hidden;
                   white-space: nowrap;
                   text-overflow: ellipsis;
-                "
-              >
+                ">
                 {{ item.remark }}
               </div>
               <template #content>
@@ -41,34 +36,13 @@
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加合同' : '查看合同'"
-      v-model="dialogVisible"
-      width="80%"
-      v-loading="loading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加合同' : '查看合同'" v-model="dialogVisible" width="80%" v-loading="loading" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #seller>
           <div style="width: 100%">
             <el-form-item label="卖方公司" prop="sellCorporationId" required>
-              <el-select
-                v-model="formData.data.sellCorporationId"
-                @change="changeSellId"
-                style="width: 100%"
-              >
-                <el-option
-                  v-for="item in corporationList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                />
+              <el-select v-model="formData.data.sellCorporationId" @change="changeSellId" style="width: 100%">
+                <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
             <el-row>
@@ -76,38 +50,26 @@
                 <el-row style="margin-top: 20px; width: 100%">
                   <el-col :span="7">
                     <el-form-item label="地址" prop="sellCountryName">
-                      <el-input
-                        v-model="formData.data.sellCountryName"
-                        placeholder="请输入国家"
-                      />
+                      <el-input v-model="formData.data.sellCountryName" placeholder="请输入国家" />
                     </el-form-item>
                   </el-col>
                   <el-col :span="1"></el-col>
                   <el-col :span="7">
                     <el-form-item label=" " prop="sellProvinceName">
-                      <el-input
-                        v-model="formData.data.sellProvinceName"
-                        placeholder="请输入省/州"
-                      />
+                      <el-input v-model="formData.data.sellProvinceName" placeholder="请输入省/州" />
                     </el-form-item>
                   </el-col>
                   <el-col :span="1"></el-col>
                   <el-col :span="8">
                     <el-form-item label=" " prop="sellCityName">
-                      <el-input
-                        v-model="formData.data.sellCityName"
-                        placeholder="请输入城市"
-                      />
+                      <el-input v-model="formData.data.sellCityName" placeholder="请输入城市" />
                     </el-form-item>
                   </el-col>
                 </el-row>
                 <el-row style="margin-top: 20px; width: 100%">
                   <el-col :span="24">
                     <el-form-item prop="sellAddress">
-                      <el-input
-                        v-model="formData.data.sellAddress"
-                        type="textarea"
-                      >
+                      <el-input v-model="formData.data.sellAddress" type="textarea">
                       </el-input>
                     </el-form-item>
                   </el-col>
@@ -119,51 +81,29 @@
         <template #shroffAccountId>
           <div style="width: 100%; margin-top: -30px; margin-bottom: 30px">
             <el-form-item label="收款账号" prop="shroffAccountId" required>
-              <el-select
-                v-model="formData.data.shroffAccountId"
-                placeholder="请选择收款账号"
-                @change="changeShroffAccount"
-                style="width: 100%"
-              >
-                <el-option
-                  v-for="item in accountList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                />
+              <el-select v-model="formData.data.shroffAccountId" placeholder="请选择收款账号" @change="changeShroffAccount" style="width: 100%">
+                <el-option v-for="item in accountList" :key="item.value" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
 
             <el-row style="margin-top: 20px">
               <el-col :span="11">
                 <el-form-item label="账户名" prop="sellAccountName">
-                  <el-input
-                    v-model="formData.data.sellAccountName"
-                    placeholder="请输入账户名"
-                  />
+                  <el-input v-model="formData.data.sellAccountName" placeholder="请输入账户名" />
                 </el-form-item>
                 <div style="height: 20px"></div>
                 <el-form-item label="账号" prop="sellAccountOpening">
-                  <el-input
-                    v-model="formData.data.sellAccountOpening"
-                    placeholder="请输入账号"
-                  />
+                  <el-input v-model="formData.data.sellAccountOpening" placeholder="请输入账号" />
                 </el-form-item>
               </el-col>
               <el-col :span="1"></el-col>
               <el-col :span="12">
                 <el-form-item label="开户行" prop="sellOpeningBank">
-                  <el-input
-                    v-model="formData.data.sellOpeningBank"
-                    placeholder="请输入开户行"
-                  />
+                  <el-input v-model="formData.data.sellOpeningBank" placeholder="请输入开户行" />
                 </el-form-item>
                 <div style="height: 20px"></div>
                 <el-form-item label="银行号" prop="sellInterbankNumber">
-                  <el-input
-                    v-model="formData.data.sellInterbankNumber"
-                    placeholder="请输入银行号"
-                  />
+                  <el-input v-model="formData.data.sellInterbankNumber" placeholder="请输入银行号" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -174,34 +114,15 @@
             <el-button type="primary" plain @click="openProduct = true">
               添加明细
             </el-button>
-            <el-table
-              :data="formData.data.salesContractDetailsList"
-              style="margin-top: 10px"
-            >
-              <el-table-column
-                prop="productName"
-                label="产品名称"
-                width="280"
-              />
-              <el-table-column
-                prop="productSpec"
-                label="规格型号"
-                width="100"
-              />
+            <el-table :data="formData.data.salesContractDetailsList" style="margin-top: 10px">
+              <el-table-column prop="productName" label="产品名称" width="280" />
+              <el-table-column prop="productSpec" label="规格型号" width="100" />
               <el-table-column prop="isCustomized" label="是否定制" width="120">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="
+                  <el-form-item :prop="
                       'salesContractDetailsList.' + $index + '.isCustomized'
-                    "
-                    :rules="rules.isCustomized"
-                    :inline-message="true"
-                  >
-                    <el-select
-                      v-model="row.isCustomized"
-                      class="m-2"
-                      placeholder="请选择"
-                    >
+                    " :rules="rules.isCustomized" :inline-message="true">
+                    <el-select v-model="row.isCustomized" class="m-2" placeholder="请选择">
                       <el-option key="1" label="是" value="1" />
                       <el-option key="0" label="否" value="0" />
                     </el-select>
@@ -210,64 +131,33 @@
               </el-table-column>
               <el-table-column prop="unitPrice" label="单价" width="130">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="'salesContractDetailsList.' + $index + '.unitPrice'"
-                    :rules="rules.unitPrice"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.unitPrice"
-                      :precision="2"
-                      :controls="false"
-                      :min="0"
-                      @change="changeAmount"
-                    />
+                  <el-form-item :prop="'salesContractDetailsList.' + $index + '.unitPrice'" :rules="rules.unitPrice" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.unitPrice" :precision="2" :controls="false" :min="0"
+                                     @change="changeAmount" />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="quantity" label="数量" width="130">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="'salesContractDetailsList.' + $index + '.quantity'"
-                    :rules="rules.quantity"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      :precision="0"
-                      :controls="false"
-                      :min="0"
-                      @change="changeAmount"
-                    />
+                  <el-form-item :prop="'salesContractDetailsList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" :precision="0" :controls="false" :min="0"
+                                     @change="changeAmount" />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="total" label="金额小计" width="100" />
               <el-table-column prop="productRemark" label="备注">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="
+                  <el-form-item :prop="
                       'salesContractDetailsList.' + $index + '.productRemark'
-                    "
-                    :rules="rules.productRemark"
-                    :inline-message="true"
-                  >
-                    <el-input
-                      v-model="row.productRemark"
-                      placeholder="请输入"
-                      type="textarea"
-                      :rows="3"
-                    />
+                    " :rules="rules.productRemark" :inline-message="true">
+                    <el-input v-model="row.productRemark" placeholder="请输入" type="textarea" :rows="3" />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="zip" label="操作" width="60">
                 <template #default="{ $index }">
-                  <el-button type="primary" link @click="handleRemove($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -276,13 +166,7 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm()"
-          size="large"
-          :loading="submitLoading"
-          v-if="modalType == 'add'"
-        >
+        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading" v-if="modalType == 'add'">
           确 定
         </el-button>
       </template>
@@ -302,9 +186,7 @@
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button v-print="printObj" size="large">打印</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large"
-          >下载PDF</el-button
-        >
+        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
       </template>
     </el-dialog>
   </div>
@@ -375,20 +257,22 @@ const config = computed(() => {
     {
       attrs: {
         label: "合同号",
-        prop: "code",
+        slot: "code",
+        width: 120,
       },
     },
     {
       attrs: {
         label: "客户名称",
         prop: "customerName",
+        "min-width": 200,
       },
     },
-
     {
       attrs: {
         label: "合同金额",
         prop: "contractAmount",
+        width: 110,
       },
       render(contractAmount) {
         return proxy.moneyFormat(contractAmount, 2);
@@ -398,18 +282,21 @@ const config = computed(() => {
       attrs: {
         label: "签订时间",
         prop: "createTime",
+        width: 160,
       },
     },
     {
       attrs: {
         label: "交货期限",
         prop: "deliveryDate",
+        width: 110,
       },
     },
     {
       attrs: {
         label: "付款方式",
         prop: "payMethod",
+        width: 100,
       },
       render(payMethod) {
         return proxy.dictValueLabel(payMethod, payMethodData.value);
@@ -419,6 +306,7 @@ const config = computed(() => {
       attrs: {
         label: "运费支付方",
         prop: "freightPayer",
+        width: 100,
       },
       render(freightPayer) {
         return proxy.dictValueLabel(freightPayer, freightPayerData.value);
@@ -456,7 +344,7 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          row.isSettled == "0"
+          row.isSettled == "1"
             ? {}
             : {
                 attrs: {
@@ -485,17 +373,17 @@ const config = computed(() => {
                   });
                 },
               },
-          {
-            attrs: {
-              label: "查看",
-              type: "primary",
-              text: true,
-            },
-            el: "button",
-            click() {
-              getDtl(row);
-            },
-          },
+          // {
+          //   attrs: {
+          //     label: "查看",
+          //     type: "primary",
+          //     text: true,
+          //   },
+          //   el: "button",
+          //   click() {
+          //     getDtl(row);
+          //   },
+          // },
           {
             attrs: {
               label: "打印",

+ 49 - 215
src/views/finance/fundManage/accountStatement/index.vue

@@ -1,14 +1,8 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :selectConfig="selectConfig"
-        highlight-current-row
-        :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+               highlight-current-row :action-list="[
           {
             text: '添加借款',
             action: () => addloan(),
@@ -29,9 +23,7 @@
             text: '添加流水',
             action: () => openModal('add'),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <!-- <template #amount="{ item }">
           <div :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')">
             <span style="padding-right: 4px">{{ item.currency }}</span>
@@ -52,67 +44,27 @@
         <template #contractCodes="{ item }">
           <div style="width: 100%">
             <div v-if="item.contractCodes">
-              <div
-                v-for="(contract, index) in item.contractCodes.split(',')"
-                :key="index"
-              >
-                <a
-                  style="color: #409eff; cursor: pointer; word-break: break-all"
-                  @click="openDetails(contract)"
-                  >{{ contract }}</a
-                >
+              <div v-for="(contract, index) in item.contractCodes.split(',')" :key="index">
+                <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="openDetails(item,index)">{{ contract }}</a>
               </div>
             </div>
           </div>
         </template>
       </byTable>
     </div>
-    <el-dialog
-      title="内部转账"
-      v-if="transferMoneyModal"
-      v-model="transferMoneyModal"
-      width="600"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="transferMoneyConfig"
-        :formOption="formOption"
-        v-model="formData2.data"
-        :rules="rules2"
-        ref="transferMoneySubmit"
-      >
+    <el-dialog title="内部转账" v-if="transferMoneyModal" v-model="transferMoneyModal" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="transferMoneyConfig" :formOption="formOption" v-model="formData2.data" :rules="rules2" ref="transferMoneySubmit">
       </byForm>
       <template #footer>
-        <el-button @click="transferMoneyModal = false" size="large"
-          >取 消</el-button
-        >
-        <el-button type="primary" @click="submitForm2()" size="large"
-          >确 定</el-button
-        >
+        <el-button @click="transferMoneyModal = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitForm2()" size="large">确 定</el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      :title="modalType == 'add' ? '添加流水' : '编辑流水'"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="600"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-        v-loading="loadingDialog"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加流水' : '编辑流水'" v-if="dialogVisible" v-model="dialogVisible" width="600">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
         <template #transactionTime>
           <div>
-            <el-date-picker
-              v-model="formData.data.transactionTime"
-              type="datetime"
-              placeholder="请选择交易时间"
-              value-format="YYYY-MM-DD HH:mm:ss"
-            />
+            <el-date-picker v-model="formData.data.transactionTime" type="datetime" placeholder="请选择交易时间" value-format="YYYY-MM-DD HH:mm:ss" />
           </div>
         </template>
         <template #money>
@@ -120,50 +72,22 @@
             <el-row :gutter="10">
               <el-col :span="6">
                 <el-form-item prop="status">
-                  <el-select
-                    v-model="formData.data.status"
-                    placeholder="请选择"
-                    style="width: 100%"
-                    @change="changeStatus()"
-                  >
-                    <el-option
-                      v-for="item in status"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    />
+                  <el-select v-model="formData.data.status" placeholder="请选择" style="width: 100%" @change="changeStatus()">
+                    <el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value" />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item prop="currency">
-                  <el-select
-                    v-model="formData.data.currency"
-                    placeholder="请选择"
-                    style="width: 100%"
-                    @change="changeAmount"
-                  >
-                    <el-option
-                      v-for="item in accountCurrency"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    />
+                  <el-select v-model="formData.data.currency" placeholder="请选择" style="width: 100%" @change="changeAmount">
+                    <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item prop="amount">
-                  <el-input-number
-                    onmousewheel="return false;"
-                    v-model="formData.data.amount"
-                    placeholder="请输入金额"
-                    style="width: 100%"
-                    :precision="2"
-                    :controls="false"
-                    :min="0"
-                    @change="changeAmount"
-                  />
+                  <el-input-number onmousewheel="return false;" v-model="formData.data.amount" placeholder="请输入金额" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="changeAmount" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -174,28 +98,18 @@
             <el-row :gutter="10">
               <el-col :span="12">
                 <el-form-item prop="amountCny">
-                  <el-input-number
-                    onmousewheel="return false;"
-                    v-model="formData.settleData.amountCny"
-                    placeholder="请输入汇算人民币金额"
-                    style="width: 100%"
-                    :precision="2"
-                    :controls="false"
-                    :min="0"
-                  />
+                  <el-input-number onmousewheel="return false;" v-model="formData.settleData.amountCny" placeholder="请输入汇算人民币金额" style="width: 100%"
+                                   :precision="2" :controls="false" :min="0" />
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <span
-                  v-if="
+                <span v-if="
                     formData.settleData.amount && formData.settleData.amountCny
-                  "
-                  >汇率是:{{
+                  ">汇率是:{{
                     parseFloat(
                       formData.settleData.amountCny / formData.settleData.amount
                     ).toFixed(2)
-                  }}</span
-                >
+                  }}</span>
               </el-col>
             </el-row>
           </div>
@@ -204,13 +118,7 @@
           <div>
             <el-form-item prop="received">
               <el-radio-group v-model="formData.data.received">
-                <el-radio
-                  v-for="item in received"
-                  :key="item.value"
-                  :label="item.value"
-                  border
-                  >{{ item.label }}</el-radio
-                >
+                <el-radio v-for="item in received" :key="item.value" :label="item.value" border>{{ item.label }}</el-radio>
               </el-radio-group>
             </el-form-item>
           </div>
@@ -218,54 +126,24 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      :title="'退税登记'"
-      v-if="dialogVisibleOne"
-      v-model="dialogVisibleOne"
-      width="600"
-    >
-      <byForm
-        :formConfig="formConfigOne"
-        :formOption="formOption"
-        v-model="formData.dataOne"
-        :rules="rulesOne"
-        ref="submitOne"
-        v-loading="loadingDialog"
-      >
+    <el-dialog :title="'退税登记'" v-if="dialogVisibleOne" v-model="dialogVisibleOne" width="600">
+      <byForm :formConfig="formConfigOne" :formOption="formOption" v-model="formData.dataOne" :rules="rulesOne" ref="submitOne"
+              v-loading="loadingDialog">
         <template #details>
           <div style="width: 100%">
-            <el-button
-              type="primary"
-              @click="handleAddRow"
-              style="margin: 10px 0"
-            >
+            <el-button type="primary" @click="handleAddRow" style="margin: 10px 0">
               添加
             </el-button>
             <el-table :data="formData.dataOne.taxRefundDetailsList">
               <el-table-column prop="count" label="合同编号" min-width="150">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="'taxRefundDetailsList.' + $index + '.contractId'"
-                    :rules="rulesOne.contractId"
-                    :inline-message="true"
-                  >
-                    <el-select
-                      v-model="row.contractId"
-                      placeholder="请选择"
-                      filterable
-                      style="width: 100%"
-                    >
-                      <el-option
-                        v-for="item in contractList"
-                        :label="item.code"
-                        :value="item.id"
-                      >
+                  <el-form-item :prop="'taxRefundDetailsList.' + $index + '.contractId'" :rules="rulesOne.contractId" :inline-message="true">
+                    <el-select v-model="row.contractId" placeholder="请选择" filterable style="width: 100%">
+                      <el-option v-for="item in contractList" :label="item.code" :value="item.id">
                       </el-option>
                     </el-select>
                   </el-form-item>
@@ -273,27 +151,15 @@
               </el-table-column>
               <el-table-column prop="amount" label="关联金额" min-width="150">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="'taxRefundDetailsList.' + $index + '.amount'"
-                    :rules="rulesOne.amount"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.amount"
-                      :precision="2"
-                      :controls="false"
-                      :min="0"
-                      style="width: 100%"
-                    />
+                  <el-form-item :prop="'taxRefundDetailsList.' + $index + '.amount'" :rules="rulesOne.amount" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.amount" :precision="2" :controls="false" :min="0"
+                                     style="width: 100%" />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="zip" label="操作" width="80">
                 <template #default="{ $index }">
-                  <el-button type="primary" link @click="handleRemove($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -301,12 +167,8 @@
         </template>
       </byForm>
       <template #footer>
-        <el-button @click="dialogVisibleOne = false" size="large"
-          >取 消</el-button
-        >
-        <el-button type="primary" @click="submitFormOne()" size="large"
-          >确 定</el-button
-        >
+        <el-button @click="dialogVisibleOne = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitFormOne()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
@@ -315,51 +177,22 @@
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button v-print="printObj" size="large">打印</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large"
-          >下载PDF</el-button
-        >
+        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      :title="submitType == 'add' ? '添加借款' : '还款'"
-      v-if="openLoanDialog"
-      v-model="openLoanDialog"
-      width="500"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="loanFormConfig"
-        :formOption="formOption"
-        :rules="loanRules"
-        v-model="formData.loanData"
-        ref="byform"
-      >
+    <el-dialog :title="submitType == 'add' ? '添加借款' : '还款'" v-if="openLoanDialog" v-model="openLoanDialog" width="500" destroy-on-close>
+      <byForm :formConfig="loanFormConfig" :formOption="formOption" :rules="loanRules" v-model="formData.loanData" ref="byform">
         <template #loanUserName>
           <div style="width: 100%">
-            <el-autocomplete
-              v-model="formData.loanData.loanUserName"
-              value-key="loanUserName"
-              :fetch-suggestions="querySearch"
-              :disabled="submitType == 'edit'"
-              clearable
-              class="inline-input w-50"
-              placeholder="请输入"
-            />
+            <el-autocomplete v-model="formData.loanData.loanUserName" value-key="loanUserName" :fetch-suggestions="querySearch"
+                             :disabled="submitType == 'edit'" clearable class="inline-input w-50" placeholder="请输入" />
           </div>
         </template>
       </byForm>
       <template #footer>
-        <el-button @click="openLoanDialog = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="handleSubmitLoan()"
-          size="large"
-          :loading="submitLoading"
-          >确 定</el-button
-        >
+        <el-button @click="openLoanDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="handleSubmitLoan()" size="large" :loading="submitLoading">确 定</el-button>
       </template>
     </el-dialog>
   </div>
@@ -372,7 +205,7 @@ import byForm from "@/components/byForm/index";
 import useUserStore from "@/store/modules/user";
 import { ElMessage, ElMessageBox } from "element-plus";
 import moment from "moment";
-import ContractPDF from "@/components/PDF/contractPDF.vue";
+import ContractPDF from "@/components/PDF/jxstContractPDF.vue";
 
 const { proxy } = getCurrentInstance();
 const accountCurrency = ref([]);
@@ -1238,9 +1071,10 @@ const exportData = (res, name) => {
 };
 const openPrint = ref(false);
 const rowData = ref({});
-const openDetails = (val) => {
+const openDetails = (row, index) => {
+  let id = row.contractIds.split(",")[index];
   rowData.value = {
-    code: val,
+    id: id,
   };
   openPrint.value = true;
 };

+ 63 - 272
src/views/finance/fundManage/flow/index.vue

@@ -3,9 +3,7 @@
     <div style="background: #fff; padding: 15px 15px 0 15px">
       <el-form :inline="true" class="demo-form-inline">
         <el-form-item label="">
-          <el-button type="primary" @click="openModal('add')"
-            >添加流水</el-button
-          >
+          <el-button type="primary" @click="openModal('add')">添加流水</el-button>
           <el-button type="primary" @click="deriveExcel()">导出Excel</el-button>
           <!-- <el-button type="primary" @click="openModalTwo('add')"
             >内部转账</el-button
@@ -13,22 +11,12 @@
         </el-form-item>
       </el-form>
     </div>
-    <div
-      style="padding: 20px; background: #fff; margin: 20px 0px"
-      class="statistics"
-    >
-      <div
-        class="statistics-item two"
-        v-if="headerData.income && headerData.income.length > 0"
-      >
+    <div style="padding: 20px; background: #fff; margin: 20px 0px" class="statistics">
+      <div class="statistics-item two" v-if="headerData.income && headerData.income.length > 0">
         <div class="left">收入合计</div>
         <div class="center" style="margin: 0 15px"></div>
         <div class="right">
-          <div
-            style="padding: 4px"
-            v-for="(item, index) in headerData.income"
-            :key="index"
-          >
+          <div style="padding: 4px" v-for="(item, index) in headerData.income" :key="index">
             <span style="margin-right: 24px; font-weight: 400">{{
               item.currency
             }}</span>
@@ -38,18 +26,11 @@
           </div>
         </div>
       </div>
-      <div
-        class="statistics-item three"
-        v-if="headerData.expenditure && headerData.expenditure.length > 0"
-      >
+      <div class="statistics-item three" v-if="headerData.expenditure && headerData.expenditure.length > 0">
         <div class="left">支出合计</div>
         <div class="center" style="margin: 0 15px"></div>
         <div class="right">
-          <div
-            style="padding: 4px"
-            v-for="(item, index) in headerData.expenditure"
-            :key="index"
-          >
+          <div style="padding: 4px" v-for="(item, index) in headerData.expenditure" :key="index">
             <span style="margin-right: 24px; font-weight: 400">{{
               item.currency
             }}</span>
@@ -61,17 +42,8 @@
       </div>
     </div>
     <div>
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :selectConfig="selectConfig"
-        highlight-current-row
-        :action-list="[]"
-        @moreSearch="moreSearch"
-        @get-list="getList"
-      >
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+               highlight-current-row :action-list="[]" @moreSearch="moreSearch" @get-list="getList">
         <!-- {
             text: '内部转账',
             action: () => openModalTwo('add'),
@@ -85,9 +57,7 @@
             action: () => openModal('add'),
           }, -->
         <template #amount="{ item }">
-          <div
-            :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')"
-          >
+          <div :style="'color: ' + (item.status === '10' ? '#04cb04;' : 'red;')">
             <span style="padding-right: 4px" v-if="item.currency">{{
               item.currency
             }}</span>
@@ -101,15 +71,8 @@
         <template #contractCodes="{ item }">
           <div style="width: 100%">
             <div v-if="item.contractCodes">
-              <div
-                v-for="(contract, index) in item.contractCodes.split(',')"
-                :key="index"
-              >
-                <a
-                  style="color: #409eff; cursor: pointer; word-break: break-all"
-                  @click="openDetails(contract)"
-                  >{{ contract }}</a
-                >
+              <div v-for="(contract, index) in item.contractCodes.split(',')" :key="index">
+                <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="openDetails(item,index)">{{ contract }}</a>
               </div>
             </div>
           </div>
@@ -117,28 +80,11 @@
       </byTable>
     </div>
 
-    <el-dialog
-      :title="modalType == 'add' ? '添加流水' : '编辑流水'"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="600"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加流水' : '编辑流水'" v-if="dialogVisible" v-model="dialogVisible" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #transactionTime>
           <div>
-            <el-date-picker
-              v-model="formData.data.transactionTime"
-              type="datetime"
-              placeholder="请选择交易时间"
-              value-format="YYYY-MM-DD HH:mm:ss"
-            />
+            <el-date-picker v-model="formData.data.transactionTime" type="datetime" placeholder="请选择交易时间" value-format="YYYY-MM-DD HH:mm:ss" />
           </div>
         </template>
         <template #money>
@@ -146,50 +92,22 @@
             <el-row :gutter="10">
               <el-col :span="6">
                 <el-form-item prop="status">
-                  <el-select
-                    v-model="formData.data.status"
-                    placeholder="请选择"
-                    style="width: 100%"
-                    @change="changeStatus()"
-                  >
-                    <el-option
-                      v-for="item in status"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    />
+                  <el-select v-model="formData.data.status" placeholder="请选择" style="width: 100%" @change="changeStatus()">
+                    <el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value" />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item prop="currency">
-                  <el-select
-                    v-model="formData.data.currency"
-                    placeholder="请选择"
-                    style="width: 100%"
-                    @change="changeAmount"
-                  >
-                    <el-option
-                      v-for="item in accountCurrency"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    />
+                  <el-select v-model="formData.data.currency" placeholder="请选择" style="width: 100%" @change="changeAmount">
+                    <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item prop="amount">
-                  <el-input-number
-                    onmousewheel="return false;"
-                    v-model="formData.data.amount"
-                    placeholder="请输入金额"
-                    style="width: 100%"
-                    :precision="2"
-                    :controls="false"
-                    :min="0"
-                    @change="changeAmount"
-                  />
+                  <el-input-number onmousewheel="return false;" v-model="formData.data.amount" placeholder="请输入金额" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="changeAmount" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -200,25 +118,16 @@
             <el-row :gutter="10">
               <el-col :span="12">
                 <el-form-item prop="amountCny">
-                  <el-input-number
-                    onmousewheel="return false;"
-                    v-model="formData.data.amountCny"
-                    placeholder="请输入汇算人民币金额"
-                    style="width: 100%"
-                    :precision="2"
-                    :controls="false"
-                    :min="0"
-                  />
+                  <el-input-number onmousewheel="return false;" v-model="formData.data.amountCny" placeholder="请输入汇算人民币金额" style="width: 100%"
+                                   :precision="2" :controls="false" :min="0" />
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <span v-if="formData.data.amount && formData.data.amountCny"
-                  >汇率是:{{
+                <span v-if="formData.data.amount && formData.data.amountCny">汇率是:{{
                     parseFloat(
                       formData.data.amountCny / formData.data.amount
                     ).toFixed(2)
-                  }}</span
-                >
+                  }}</span>
               </el-col>
             </el-row>
           </div>
@@ -227,13 +136,7 @@
           <div>
             <el-form-item prop="received">
               <el-radio-group v-model="formData.data.received">
-                <el-radio
-                  v-for="item in received"
-                  :key="item.value"
-                  :label="item.value"
-                  border
-                  >{{ item.label }}</el-radio
-                >
+                <el-radio v-for="item in received" :key="item.value" :label="item.value" border>{{ item.label }}</el-radio>
               </el-radio-group>
             </el-form-item>
           </div>
@@ -241,49 +144,23 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="高级检索"
-      v-if="openSearch"
-      v-model="openSearch"
-      width="600"
-      :before-close="cancelSearch"
-    >
-      <byForm
-        :formConfig="formSearchConfig"
-        :formOption="formOption"
-        v-model="sourceList.pagination"
-      >
+    <el-dialog title="高级检索" v-if="openSearch" v-model="openSearch" width="600" :before-close="cancelSearch">
+      <byForm :formConfig="formSearchConfig" :formOption="formOption" v-model="sourceList.pagination">
         <template #money>
           <div style="width: 100%">
             <el-row :gutter="10">
               <el-col :span="11">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="sourceList.pagination.beginAmount"
-                  placeholder="请输入"
-                  style="width: 100%"
-                  :precision="2"
-                  :controls="false"
-                  :min="0"
-                />
+                <el-input-number onmousewheel="return false;" v-model="sourceList.pagination.beginAmount" placeholder="请输入" style="width: 100%"
+                                 :precision="2" :controls="false" :min="0" />
               </el-col>
               <el-col :span="2" style="text-align: center">到</el-col>
               <el-col :span="11">
-                <el-input-number
-                  onmousewheel="return false;"
-                  v-model="sourceList.pagination.endAmount"
-                  placeholder="请输入"
-                  style="width: 100%"
-                  :precision="2"
-                  :controls="false"
-                  :min="0"
-                />
+                <el-input-number onmousewheel="return false;" v-model="sourceList.pagination.endAmount" placeholder="请输入" style="width: 100%"
+                                 :precision="2" :controls="false" :min="0" />
               </el-col>
             </el-row>
           </div>
@@ -293,23 +170,13 @@
           <div style="width: 100%">
             <el-row :gutter="10">
               <el-col :span="11">
-                <el-date-picker
-                  v-model="sourceList.pagination.startTime"
-                  type="datetime"
-                  placeholder="请选择"
-                  style="width: 100%"
-                  value-format="YYYY-MM-DD HH:mm:ss"
-                />
+                <el-date-picker v-model="sourceList.pagination.startTime" type="datetime" placeholder="请选择" style="width: 100%"
+                                value-format="YYYY-MM-DD HH:mm:ss" />
               </el-col>
               <el-col :span="2" style="text-align: center">到</el-col>
               <el-col :span="11">
-                <el-date-picker
-                  v-model="sourceList.pagination.stopTime"
-                  type="datetime"
-                  placeholder="请选择"
-                  style="width: 100%"
-                  value-format="YYYY-MM-DD HH:mm:ss"
-                />
+                <el-date-picker v-model="sourceList.pagination.stopTime" type="datetime" placeholder="请选择" style="width: 100%"
+                                value-format="YYYY-MM-DD HH:mm:ss" />
               </el-col>
             </el-row>
           </div>
@@ -317,60 +184,26 @@
       </byForm>
       <template #footer>
         <el-button @click="cancelSearch()" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitSearch()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitSearch()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      :title="'内部转账'"
-      v-if="dialogVisibleTwo"
-      v-model="dialogVisibleTwo"
-      width="600"
-    >
-      <byForm
-        :formConfig="formConfigTwo"
-        :formOption="formOption"
-        v-model="formData.dataTwo"
-        :rules="rulesTwo"
-        ref="submitTwo"
-        v-loading="loadingDialog"
-      >
+    <el-dialog :title="'内部转账'" v-if="dialogVisibleTwo" v-model="dialogVisibleTwo" width="600">
+      <byForm :formConfig="formConfigTwo" :formOption="formOption" v-model="formData.dataTwo" :rules="rulesTwo" ref="submitTwo"
+              v-loading="loadingDialog">
       </byForm>
       <template #footer>
-        <el-button @click="dialogVisibleTwo = false" size="large"
-          >取 消</el-button
-        >
-        <el-button type="primary" @click="submitFormTwo()" size="large"
-          >确 定</el-button
-        >
+        <el-button @click="dialogVisibleTwo = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitFormTwo()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      :title="'汇算'"
-      v-if="settleDialog"
-      v-model="settleDialog"
-      width="600"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="settleFormConfig"
-        :formOption="settleFormOption"
-        v-model="formData.settleData"
-        :rules="settleRules"
-        ref="settleForm"
-      >
+    <el-dialog :title="'汇算'" v-if="settleDialog" v-model="settleDialog" width="600" v-loading="loadingDialog">
+      <byForm :formConfig="settleFormConfig" :formOption="settleFormOption" v-model="formData.settleData" :rules="settleRules" ref="settleForm">
         <template #transactionTime>
           <div>
-            <el-date-picker
-              v-model="formData.settleData.transactionTime"
-              type="datetime"
-              placeholder="请选择交易时间"
-              value-format="YYYY-MM-DD HH:mm:ss"
-              disabled
-            />
+            <el-date-picker v-model="formData.settleData.transactionTime" type="datetime" placeholder="请选择交易时间" value-format="YYYY-MM-DD HH:mm:ss"
+                            disabled />
           </div>
         </template>
         <template #money>
@@ -378,51 +211,22 @@
             <el-row :gutter="10">
               <el-col :span="6">
                 <el-form-item prop="status">
-                  <el-select
-                    v-model="formData.settleData.status"
-                    placeholder="请选择"
-                    style="width: 100%"
-                    @change="changeStatus()"
-                    disabled
-                  >
-                    <el-option
-                      v-for="item in status"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    />
+                  <el-select v-model="formData.settleData.status" placeholder="请选择" style="width: 100%" @change="changeStatus()" disabled>
+                    <el-option v-for="item in status" :key="item.value" :label="item.label" :value="item.value" />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="6">
                 <el-form-item prop="currency">
-                  <el-select
-                    v-model="formData.settleData.currency"
-                    placeholder="请选择"
-                    style="width: 100%"
-                    disabled
-                  >
-                    <el-option
-                      v-for="item in accountCurrency"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    />
+                  <el-select v-model="formData.settleData.currency" placeholder="请选择" style="width: 100%" disabled>
+                    <el-option v-for="item in accountCurrency" :key="item.value" :label="item.label" :value="item.value" />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item prop="amount">
-                  <el-input-number
-                    onmousewheel="return false;"
-                    v-model="formData.settleData.amount"
-                    placeholder="请输入金额"
-                    style="width: 100%"
-                    :precision="2"
-                    :controls="false"
-                    :min="0"
-                    disabled
-                  />
+                  <el-input-number onmousewheel="return false;" v-model="formData.settleData.amount" placeholder="请输入金额" style="width: 100%"
+                                   :precision="2" :controls="false" :min="0" disabled />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -433,28 +237,18 @@
             <el-row :gutter="10">
               <el-col :span="12">
                 <el-form-item prop="amountCny">
-                  <el-input-number
-                    onmousewheel="return false;"
-                    v-model="formData.settleData.amountCny"
-                    placeholder="请输入汇算人民币金额"
-                    style="width: 100%"
-                    :precision="2"
-                    :controls="false"
-                    :min="0"
-                  />
+                  <el-input-number onmousewheel="return false;" v-model="formData.settleData.amountCny" placeholder="请输入汇算人民币金额" style="width: 100%"
+                                   :precision="2" :controls="false" :min="0" />
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <span
-                  v-if="
+                <span v-if="
                     formData.settleData.amount && formData.settleData.amountCny
-                  "
-                  >汇率是:{{
+                  ">汇率是:{{
                     parseFloat(
                       formData.settleData.amountCny / formData.settleData.amount
                     ).toFixed(2)
-                  }}</span
-                >
+                  }}</span>
               </el-col>
             </el-row>
           </div>
@@ -462,9 +256,7 @@
       </byForm>
       <template #footer>
         <el-button @click="settleDialog = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitSettleForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitSettleForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
@@ -473,9 +265,7 @@
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button v-print="printObj" size="large">打印</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large"
-          >下载PDF</el-button
-        >
+        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
       </template>
     </el-dialog>
   </div>
@@ -488,7 +278,7 @@ import byForm from "@/components/byForm/index";
 import useUserStore from "@/store/modules/user";
 import { ElMessage, ElMessageBox } from "element-plus";
 import moment from "moment";
-import ContractPDF from "@/components/PDF/contractPDF.vue";
+import ContractPDF from "@/components/PDF/jxstContractPDF.vue";
 
 const { proxy } = getCurrentInstance();
 const accountCurrency = ref([]);
@@ -1030,9 +820,10 @@ const submitSearch = () => {
 };
 const openPrint = ref(false);
 const rowData = ref({});
-const openDetails = (val) => {
+const openDetails = (row, index) => {
+  let id = row.contractIds.split(",")[index];
   rowData.value = {
-    code: val,
+    id: id,
   };
   openPrint.value = true;
 };

+ 92 - 71
src/views/product/material/index.vue

@@ -1,29 +1,16 @@
 <template>
   <div class="user">
     <div class="tree">
-      <treeList
-        title="物料分类"
-        submitType="2"
-        :data="treeListData"
-        v-model="sourceList.pagination.productClassifyId"
-        @change="treeChange"
-        @changeTreeList="getTreeList"
-      >
+      <treeList title="物料分类" submitType="2" :data="treeListData" v-model="sourceList.pagination.productClassifyId" @change="treeChange"
+                @changeTreeList="getTreeList">
       </treeList>
     </div>
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           props.selectStatus
             ? {}
             : {
@@ -38,48 +25,25 @@
                 action: () => openModal('add'),
                 disabled: false,
               },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #pic="{ item }">
           <div v-if="item.fileList.length > 0">
-            <img
-              :src="item.fileList[0].fileUrl"
-              class="pic"
-              @click="handleClickFile(item.fileList[0])"
-            />
+            <img :src="item.fileList[0].fileUrl" class="pic" @click="handleClickFile(item.fileList[0])" />
           </div>
           <div v-else></div>
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加' : '编辑'"
-      v-model="dialogVisible"
-      width="500"
-      v-loading="loading"
-      destroy-on-close
-    >
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-model="dialogVisible" width="500" v-loading="loading" destroy-on-close>
       <div class="public_height_dialog">
-        <byForm
-          :formConfig="formConfig"
-          :formOption="formOption"
-          v-model="formData.data"
-          :rules="rules"
-          ref="byform"
-        >
+        <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
           <template #productPic>
             <div>
-              <el-upload
-                v-model:fileList="fileList"
-                action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-                :data="uploadData"
-                list-type="picture-card"
-                :on-remove="handleRemove"
-                :on-success="handleSuccess"
-                :before-upload="handleBeforeUpload"
-              >
-                <el-icon><Plus /></el-icon>
+              <el-upload v-model:fileList="fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :data="uploadData"
+                         list-type="picture-card" :on-remove="handleRemove" :on-success="handleSuccess" :before-upload="handleBeforeUpload">
+                <el-icon>
+                  <Plus />
+                </el-icon>
               </el-upload>
             </div>
           </template>
@@ -88,36 +52,48 @@
 
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      title="Excel导入"
-      v-model="openExcelDialog"
-      width="400"
-      v-loading="loading"
-    >
+    <el-dialog title="Excel导入" v-model="openExcelDialog" width="400" v-loading="loading">
       <template #footer>
-        <el-button @click="openExcelDialog = false" size="large"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="submitExcel()"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button @click="openExcelDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" @click="submitExcel()" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
     </el-dialog>
+
+    <el-dialog title="打印" v-if="printDialog" v-model="printDialog" width="500">
+      <div style="padding-right: 20px">
+        <div id="pdfDom">
+          <div style="display: flex ;border: 1px solid #000; padding: 10px; margin-bottom: 20px">
+            <div :ref="rowData.id"></div>
+            <div style="
+                  margin-left: 20px;
+                  display: flex;
+                  padding: 10px 0;
+                  flex-direction: column;
+                  justify-content: space-between;
+                ">
+              <div class="print-row">物料编码:{{ rowData.code }}</div>
+
+              <div class="print-row">物料名称:{{ rowData.name }}</div>
+              <div class="print-row">物料型号:{{ rowData.spec }}</div>
+
+            </div>
+          </div>
+        </div>
+      </div>
+
+      <template #footer>
+        <el-button @click="printDialog = false" size="large">取 消</el-button>
+        <el-button type="primary" v-print="printObj" size="large">打 印</el-button>
+      </template>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -127,6 +103,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import treeList from "@/components/product/treeList";
+import QRCode from "qrcodejs2-fix";
 
 import { computed, defineComponent, ref } from "vue";
 const loading = ref(false);
@@ -305,6 +282,19 @@ const config = computed(() => {
                   });
                 },
               },
+          props.selectStatus
+            ? {}
+            : {
+                attrs: {
+                  label: "查看二维码",
+                  type: "primary",
+                  text: true,
+                },
+                el: "button",
+                click() {
+                  handlePrint(row);
+                },
+              },
         ];
       },
     },
@@ -576,6 +566,32 @@ getDict();
 const clickSelect = (item) => {
   proxy.$emit("selectMaterial", item);
 };
+
+const printDialog = ref(false);
+const rowData = ref({});
+const handlePrint = (row) => {
+  printDialog.value = true;
+  rowData.value = row;
+  let url = `http://139.9.102.170:10021/jxst/pro/materialDetails?productId=${row.id}`;
+  nextTick(() => {
+    proxy.$refs[row.id].innerHTML = ""; //清除二维码方法一
+    new QRCode(proxy.$refs[row.id], {
+      text: url,
+      width: 100,
+      height: 100,
+      colorDark: "#000000",
+      colorLight: "#ffffff",
+      correctLevel: QRCode.CorrectLevel.H,
+    });
+  });
+};
+const printObj = ref({
+  id: "pdfDom",
+  popTitle: "",
+  extraCss:
+    "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
+  extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
+});
 </script>
 
 <style lang="scss" scoped>
@@ -597,4 +613,9 @@ const clickSelect = (item) => {
   cursor: pointer;
   vertical-align: middle;
 }
+.print-row {
+  font-size: 14px;
+  font-weight: 700;
+  color: #000;
+}
 </style>

+ 34 - 63
src/views/purchaseManage/purchaseManage/subscribe/index.vue

@@ -2,53 +2,30 @@
   <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="{
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           //element talbe事件都能传
           select: select,
-        }"
-        :action-list="[
+        }" :action-list="[
           {
             text: '发起申购',
             action: () => openModal(),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #productUnit="{ item }">
           <div>
             {{ getUnit(item) }}
           </div>
         </template>
         <template #fileSlot="{ item }">
-          <div
-            style="cursor: pointer; color: #409eff"
-            @click="handleClickFile(item)"
-          >
+          <div style="cursor: pointer; color: #409eff" @click="handleClickFile(item)">
             {{ item.fileName }}
           </div>
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加供应商' : '编辑供应商'"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="loading"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加供应商' : '编辑供应商'" v-model="dialogVisible" width="800" v-loading="loading">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #address>
           <el-row :gutter="10" style="width: 100%">
             <el-col :span="8">
@@ -92,31 +69,15 @@
 
         <template #fileSlot>
           <div>
-            <el-upload
-              v-model:fileList="fileList"
-              class="upload-demo"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              :limit="3"
-              :data="uploadData"
-              :on-preview="handlePreview"
-              :on-remove="handleRemove"
-              :on-success="handleSuccess"
-              :before-upload="handleBeforeUpload"
-              accept=".pdf"
-            >
+            <el-upload v-model:fileList="fileList" class="upload-demo" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" :limit="3"
+                       :data="uploadData" :on-preview="handlePreview" :on-remove="handleRemove" :on-success="handleSuccess"
+                       :before-upload="handleBeforeUpload" accept=".pdf">
               <el-button type="primary">选择</el-button>
               <template #file>
                 <div>
                   <div style="margin-top: 15px">
-                    <el-tag
-                      class="ml-2"
-                      type="info"
-                      v-for="(item, index) in fileList"
-                      :key="index"
-                      closable
-                      @close="handleClose(index)"
-                      >{{ item.fileName }}</el-tag
-                    >
+                    <el-tag class="ml-2" type="info" v-for="(item, index) in fileList" :key="index" closable
+                            @close="handleClose(index)">{{ item.fileName }}</el-tag>
                   </div>
                 </div>
               </template>
@@ -126,12 +87,7 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          v-no-double-click="submitForm"
-          size="large"
-          :loading="submitLoading"
-        >
+        <el-button type="primary" v-no-double-click="submitForm" size="large" :loading="submitLoading">
           确 定
         </el-button>
       </template>
@@ -196,12 +152,14 @@ const config = computed(() => {
       attrs: {
         label: "申购单号",
         prop: "subscribeCode",
+        width: 130,
       },
     },
     {
       attrs: {
         label: "货品类型",
         prop: "productDefinition",
+        width: 80,
       },
       render(productDefinition) {
         return productDefinition == 1 ? "产品" : "物料";
@@ -211,12 +169,14 @@ const config = computed(() => {
       attrs: {
         label: "所属分类",
         prop: "productCategory",
+        width: 120,
       },
     },
     {
       attrs: {
         label: "货品编码",
         prop: "productCode",
+        width: 140,
       },
     },
     {
@@ -237,18 +197,20 @@ const config = computed(() => {
       attrs: {
         label: "申购数量",
         prop: "count",
+        width: 100,
       },
     },
-    {
-      attrs: {
-        label: "审批状态",
-        prop: "count11",
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "审批状态",
+    //     prop: "count11",
+    //   },
+    // },
     {
       attrs: {
         label: "采购状态",
         prop: "status",
+        width: 100,
       },
       render(status) {
         return statusData.value.find((x) => x.value == status).label;
@@ -258,6 +220,14 @@ const config = computed(() => {
       attrs: {
         label: "申购原因",
         prop: "subscribeContent",
+        // width: 160,
+      },
+    },
+    {
+      attrs: {
+        label: "创建时间",
+        prop: "createTime",
+        width: 160,
       },
     },
     {
@@ -265,6 +235,7 @@ const config = computed(() => {
         label: "操作",
         width: "80",
         align: "center",
+        fixed: "right",
       },
       // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {

+ 9 - 37
src/views/purchaseSales/outAndInWarehouse/inventoryInquiry/index.vue

@@ -1,30 +1,18 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :selectConfig="selectConfig"
-        :statConfig="selectStatus ? [] : statConfig"
-        highlight-current-row
-        :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+               :statConfig="selectStatus ? [] : statConfig" highlight-current-row :action-list="[
           selectStatus
             ? {}
             : {
                 text: '导出Excel',
                 action: () => deriveExcel(),
               },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #quantity="{ item }">
           <div style="width: 100%; text-align: center">
-            <div
-              v-if="item.quantity < Number(item.stockThreshold)"
-              style="color: red; font-weight: 700"
-            >
+            <div v-if="item.quantity < Number(item.stockThreshold)" style="color: red; font-weight: 700">
               {{ item.quantity }}
             </div>
             <div v-else>
@@ -34,34 +22,19 @@
         </template>
         <template #btn="{ item }">
           <div style="width: 100%; text-align: center">
-            <el-button
-              type="primary"
-              @click="checkTheFlow(item)"
-              v-if="!selectStatus"
-              text
-              >查看流水</el-button
-            >
+            <el-button type="primary" @click="checkTheFlow(item)" v-if="!selectStatus" text>查看流水</el-button>
             <!-- <el-button type="primary" @click="clickSelect(item)" v-else text
               >选择</el-button
             > -->
-            <el-button type="primary" @click="clickSelect(item)" v-else text
-              >选择</el-button
-            >
+            <el-button type="primary" @click="clickSelect(item)" v-else text>选择</el-button>
           </div>
         </template>
       </byTable>
       <div v-if="goodList && goodList.length > 0">
         <div>已选择货品</div>
         <div style="margin: 10px 0px">
-          <el-tag
-            style="margin-right: 10px"
-            type="info"
-            closable
-            v-for="(good, index) in goodList"
-            :key="good.id"
-            @close="handleRemove(index)"
-            >{{ good.productName }}</el-tag
-          >
+          <el-tag style="margin-right: 10px" type="info" closable v-for="(good, index) in goodList" :key="good.id"
+                  @close="handleRemove(index)">{{ good.productName }}</el-tag>
         </div>
         <div style="text-align: center">
           <el-button @click="handleCancel" size="large">取消</el-button>
@@ -207,12 +180,11 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "结存单价",
+        label: "加权成本单价",
         prop: "unitPrice",
         width: 120,
       },
     },
-
     {
       attrs: {
         label: "操作",

+ 1 - 0
src/views/purchaseSales/outAndInWarehouse/manualDelivery/index.vue

@@ -277,6 +277,7 @@ const openModal = () => {
     exWarehousePerson: useUserStore().user.nickName,
     list: [],
   };
+  selectOrder.value = "";
   loadingDialog.value = false;
   dialogVisible.value = true;
 };

+ 23 - 102
src/views/purchaseSales/outAndInWarehouse/manualWarehousing/index.vue

@@ -1,43 +1,21 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :selectConfig="selectConfig"
-        highlight-current-row
-        :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+               highlight-current-row :action-list="[
           {
             text: '手动入库',
             action: () => openModal(),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
       </byTable>
     </div>
 
-    <el-dialog
-      title="手动入库"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="1000"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog title="手动入库" v-if="dialogVisible" v-model="dialogVisible" width="1000" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #workOrderId>
           <div style="width: 100%">
-            <el-button type="primary" @click="openOrder = true"
-              >选择工单</el-button
-            >
+            <el-button type="primary" @click="openOrder = true">选择工单</el-button>
             <div style="margin-top: 10px" v-if="selectOrder">
               已选择: {{ selectOrder }}
             </div>
@@ -46,67 +24,27 @@
 
         <template #details>
           <div style="width: 100%">
-            <el-button type="primary" @click="openProduct = true"
-              >添加明细</el-button
-            >
-            <el-table
-              :data="formData.data.list"
-              style="width: 100%; margin-top: 16px"
-            >
-              <el-table-column
-                prop="productCode"
-                label="产品编码"
-                width="140"
-              />
-              <el-table-column
-                prop="productName"
-                label="产品名称"
-                min-width="220"
-              />
-              <el-table-column
-                prop="productSpec"
-                label="规格型号"
-                min-width="220"
-              />
-              <el-table-column
-                prop="productUnit"
-                label="单位"
-                width="100"
-                :formatter="
+            <el-button type="primary" @click="openProduct = true">添加明细</el-button>
+            <el-table :data="formData.data.list" style="width: 100%; margin-top: 16px">
+              <el-table-column prop="productCode" label="产品编码" width="140" />
+              <el-table-column prop="productName" label="产品名称" min-width="220" />
+              <el-table-column prop="productSpec" label="规格型号" min-width="220" />
+              <el-table-column prop="productUnit" label="单位" width="100" :formatter="
                   (row) => dictValueLabel(row.productUnit, productUnit)
-                "
-              />
+                " />
               <el-table-column label="入库数量" width="160">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'list.' + $index + '.quantity'"
-                      :rules="rules.quantity"
-                      :inline-message="true"
-                    >
-                      <el-input-number
-                        v-model="row.quantity"
-                        placeholder="请输入数量"
-                        style="width: 100%"
-                        :precision="0"
-                        :controls="false"
-                        :min="1"
-                        onmousewheel="return false;"
-                      />
+                    <el-form-item :prop="'list.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                      <el-input-number v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0" :controls="false" :min="1"
+                                       onmousewheel="return false;" />
                     </el-form-item>
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column
-                align="center"
-                label="操作"
-                width="80"
-                fixed="right"
-              >
+              <el-table-column align="center" label="操作" width="80" fixed="right">
                 <template #default="{ row, $index }">
-                  <el-button type="primary" link @click="handleDelete($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="handleDelete($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -115,33 +53,15 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      v-if="openProduct"
-      v-model="openProduct"
-      title="选择商品"
-      width="70%"
-      append-to-body
-    >
-      <SelectGoods
-        :selectList="acquireSelectList()"
-        @cancel="openProduct = false"
-        @pushGoods="pushGoods"
-      ></SelectGoods>
+    <el-dialog v-if="openProduct" v-model="openProduct" title="选择商品" width="70%" append-to-body>
+      <SelectGoods :selectList="acquireSelectList()" @cancel="openProduct = false" @pushGoods="pushGoods"></SelectGoods>
     </el-dialog>
 
-    <el-dialog
-      v-model="openOrder"
-      title="工单选择"
-      width="80%"
-      append-to-body
-      destroy-on-close
-    >
+    <el-dialog v-model="openOrder" title="工单选择" width="80%" append-to-body destroy-on-close>
       <WorkOrder :isShowSelect="true" @handleSelectRow="handleSelectRow">
       </WorkOrder>
       <template #footer>
@@ -343,6 +263,7 @@ const openModal = () => {
     list: [],
     exWarehousePerson: useUserStore().user.nickName,
   };
+  selectOrder.value = "";
   loadingDialog.value = false;
   dialogVisible.value = true;
 };

+ 21 - 19
src/views/purchaseSales/outAndInWarehouse/record/index.vue

@@ -1,21 +1,13 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :selectConfig="selectConfig"
-        highlight-current-row
-        :action-list="[
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+               highlight-current-row :action-list="[
           {
             text: '导出Excel',
             action: () => deriveExcel(),
           },
-        ]"
-        @get-list="getList"
-      >
+        ]" @get-list="getList">
         <template #warehouseName="{ item }">
           <div>
             <!-- <span v-if="item.opType == 1">{{ item.toWarehouseName }}</span>
@@ -34,8 +26,7 @@
         <div class="flex-top-bottom">
           <div>
             <span v-show="printData.corporateName && printData.code">
-              {{ printData.corporateName }} ({{ printData.code }})</span
-            >
+              {{ printData.corporateName }} ({{ printData.code }})</span>
           </div>
           <div>{{ printData.createTime }}</div>
         </div>
@@ -80,12 +71,8 @@
       </div>
       <template #footer ref="printBtn">
         <el-button @click="openPdf = false" size="large">关闭</el-button>
-        <el-button type="primary" v-print="printObj" size="large"
-          >打印</el-button
-        >
-        <el-button type="primary" @click="clickDownload()" size="large"
-          >下载PDF</el-button
-        >
+        <el-button type="primary" v-print="printObj" size="large">打印</el-button>
+        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
       </template>
     </el-dialog>
   </div>
@@ -188,6 +175,14 @@ const typeList = ref([
     label: "工单出库",
     value: "21",
   },
+  {
+    label: "库存盘点修正入库",
+    value: "22",
+  },
+  {
+    label: "库存盘点修正出库",
+    value: "23",
+  },
 ]);
 const warehouseList = ref([]);
 const productUnit = ref([]);
@@ -245,6 +240,13 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "工单号",
+        prop: "workOrderCode",
+        width: 110,
+      },
+    },
+    {
+      attrs: {
         label: "仓库名称",
         slot: "warehouseName",
       },

+ 20 - 27
src/views/purchaseSales/outAndInWarehouse/waitingForDelivery/index.vue

@@ -1,15 +1,8 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :selectConfig="selectConfig"
-        highlight-current-row
-        @get-list="getList"
-      >
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+               highlight-current-row @get-list="getList">
         <template #productType="{ item }">
           <div>
             <div v-if="item.productDefinition == 1">
@@ -30,29 +23,23 @@
             </div>
           </div>
         </template>
+        <template #waitQuantity="{item}">
+          <div style="width:100%">
+            <span style="padding: 4px" class="active">
+              {{
+               item.waitQuantity
+              }}</span>
+          </div>
+        </template>
       </byTable>
     </div>
 
-    <el-dialog
-      title="出库"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="400"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog title="出库" v-if="dialogVisible" v-model="dialogVisible" width="400" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
   </div>
@@ -212,7 +199,7 @@ const config = computed(() => {
     {
       attrs: {
         label: "待出库数量",
-        prop: "waitQuantity",
+        slot: "waitQuantity",
         width: 120,
       },
     },
@@ -456,4 +443,10 @@ const clickOperation = (row) => {
 ::v-deep(.el-input-number .el-input__inner) {
   text-align: left;
 }
+
+.active {
+  background: #a6dd82;
+  color: #fff;
+  border-radius: 4px;
+}
 </style>

+ 42 - 44
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -1,64 +1,41 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        :selectConfig="selectConfig"
-        highlight-current-row
-        @get-list="getList"
-      >
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
+               highlight-current-row @get-list="getList">
+        <template #waitQuantity="{item}">
+          <div style="width:100%">
+            <span style="padding: 4px" class="active">
+              {{
+               item.waitQuantity
+              }}</span>
+          </div>
+        </template>
       </byTable>
     </div>
 
-    <el-dialog
-      title="入库"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="400"
-      v-loading="loadingDialog"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog title="入库" v-if="dialogVisible" v-model="dialogVisible" width="400" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #file>
           <div style="width: 100%">
-            <el-upload
-              v-model:fileList="formData.data.fileList"
-              action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
-              multiple
-              :on-preview="onPreviewFile"
-            >
-              <el-button type="primary" plain disabled>选择</el-button>
+            <el-upload v-model:fileList="formData.data.fileList" action="https://winfaster.obs.cn-south-1.myhuaweicloud.com" multiple
+                       :on-preview="onPreviewFile">
+              <!-- <el-button type="primary" plain disabled>选择</el-button> -->
+
             </el-upload>
           </div>
         </template>
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
-    <el-dialog
-      title="打印"
-      v-if="printDialog"
-      v-model="printDialog"
-      width="680"
-    >
+    <el-dialog title="打印" v-if="printDialog" v-model="printDialog" width="680">
       <ProductionPDF :rowData="rowData"></ProductionPDF>
       <template #footer>
         <el-button @click="printDialog = false" size="large">取 消</el-button>
-        <el-button type="primary" v-print="printObj" size="large"
-          >打 印</el-button
-        >
+        <el-button type="primary" v-print="printObj" size="large">打 印</el-button>
       </template>
     </el-dialog>
   </div>
@@ -216,13 +193,20 @@ const config = computed(() => {
     },
     {
       attrs: {
-        label: "入库数量",
+        label: "入库数量",
         prop: "quantity",
         width: 120,
       },
     },
     {
       attrs: {
+        label: "待入库数量",
+        slot: "waitQuantity",
+        width: 120,
+      },
+    },
+    {
+      attrs: {
         label: "入库状态",
         prop: "status",
         width: 140,
@@ -236,6 +220,7 @@ const config = computed(() => {
         label: "操作",
         width: "160",
         align: "center",
+        fixed: "right",
       },
       renderHTML(row) {
         return [
@@ -304,7 +289,7 @@ const getList = async (req) => {
     .then((res) => {
       sourceList.value.data = res.rows.map((x) => ({
         ...x,
-        quantity: (x.quantity - x.receiptQuantity).toFixed(4),
+        waitQuantity: (x.quantity - x.receiptQuantity).toFixed(4),
       }));
       sourceList.value.pagination.total = res.total;
       setTimeout(() => {
@@ -362,6 +347,13 @@ const formConfig = computed(() => {
     {
       type: "input",
       prop: "quantity",
+      label: "需入库数量",
+      itemType: "text",
+      disabled: true,
+    },
+    {
+      type: "input",
+      prop: "waitQuantity",
       label: "待入库数量",
       itemType: "text",
       disabled: true,
@@ -388,6 +380,7 @@ const formConfig = computed(() => {
       type: "slot",
       slotName: "file",
       label: "工序图片",
+      isShow: showType.value == 2,
     },
   ];
 });
@@ -486,4 +479,9 @@ const printObj = ref({
 ::v-deep(.el-input-number .el-input__inner) {
   text-align: left;
 }
+.active {
+  background: #a6dd82;
+  color: #fff;
+  border-radius: 4px;
+}
 </style>

+ 47 - 162
src/views/salesMange/saleContract/jxstContractSelect/index.vue

@@ -1,19 +1,10 @@
 <template>
   <div class="tenant">
     <div class="content">
-      <byTable
-        :source="sourceList.data"
-        :pagination="sourceList.pagination"
-        :config="config"
-        :loading="loading"
-        highlight-current-row
-        :selectConfig="selectConfig"
-        :table-events="{
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row
+               :selectConfig="selectConfig" :table-events="{
           select: select,
-        }"
-        :action-list="[]"
-        @get-list="getList"
-      >
+        }" :action-list="[]" @get-list="getList">
         <!-- {
             text: '添加合同',
             action: () => openModal('add'),
@@ -21,13 +12,11 @@
         <template #remark="{ item }">
           <div style="width: 100%">
             <el-tooltip placement="bottom" effect="dark">
-              <div
-                style="
+              <div style="
                   overflow: hidden;
                   white-space: nowrap;
                   text-overflow: ellipsis;
-                "
-              >
+                ">
                 {{ item.remark }}
               </div>
               <template #content>
@@ -40,34 +29,13 @@
         </template>
       </byTable>
     </div>
-    <el-dialog
-      :title="modalType == 'add' ? '添加合同' : '查看合同'"
-      v-model="dialogVisible"
-      width="80%"
-      v-loading="loading"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="byform"
-      >
+    <el-dialog :title="modalType == 'add' ? '添加合同' : '查看合同'" v-model="dialogVisible" width="80%" v-loading="loading" destroy-on-close>
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
         <template #seller>
           <div style="width: 100%">
             <el-form-item label="卖方公司" prop="sellCorporationId" required>
-              <el-select
-                v-model="formData.data.sellCorporationId"
-                @change="changeSellId"
-                style="width: 100%"
-              >
-                <el-option
-                  v-for="item in corporationList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                />
+              <el-select v-model="formData.data.sellCorporationId" @change="changeSellId" style="width: 100%">
+                <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
             <el-row>
@@ -75,38 +43,26 @@
                 <el-row style="margin-top: 20px; width: 100%">
                   <el-col :span="7">
                     <el-form-item label="地址" prop="sellCountryName">
-                      <el-input
-                        v-model="formData.data.sellCountryName"
-                        placeholder="请输入国家"
-                      />
+                      <el-input v-model="formData.data.sellCountryName" placeholder="请输入国家" />
                     </el-form-item>
                   </el-col>
                   <el-col :span="1"></el-col>
                   <el-col :span="7">
                     <el-form-item label=" " prop="sellProvinceName">
-                      <el-input
-                        v-model="formData.data.sellProvinceName"
-                        placeholder="请输入省/州"
-                      />
+                      <el-input v-model="formData.data.sellProvinceName" placeholder="请输入省/州" />
                     </el-form-item>
                   </el-col>
                   <el-col :span="1"></el-col>
                   <el-col :span="8">
                     <el-form-item label=" " prop="sellCityName">
-                      <el-input
-                        v-model="formData.data.sellCityName"
-                        placeholder="请输入城市"
-                      />
+                      <el-input v-model="formData.data.sellCityName" placeholder="请输入城市" />
                     </el-form-item>
                   </el-col>
                 </el-row>
                 <el-row style="margin-top: 20px; width: 100%">
                   <el-col :span="24">
                     <el-form-item prop="sellAddress">
-                      <el-input
-                        v-model="formData.data.sellAddress"
-                        type="textarea"
-                      >
+                      <el-input v-model="formData.data.sellAddress" type="textarea">
                       </el-input>
                     </el-form-item>
                   </el-col>
@@ -118,51 +74,29 @@
         <template #shroffAccountId>
           <div style="width: 100%; margin-top: -30px; margin-bottom: 30px">
             <el-form-item label="收款账号" prop="shroffAccountId" required>
-              <el-select
-                v-model="formData.data.shroffAccountId"
-                placeholder="请选择收款账号"
-                @change="changeShroffAccount"
-                style="width: 100%"
-              >
-                <el-option
-                  v-for="item in accountList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                />
+              <el-select v-model="formData.data.shroffAccountId" placeholder="请选择收款账号" @change="changeShroffAccount" style="width: 100%">
+                <el-option v-for="item in accountList" :key="item.value" :label="item.label" :value="item.value" />
               </el-select>
             </el-form-item>
 
             <el-row style="margin-top: 20px">
               <el-col :span="11">
                 <el-form-item label="账户名" prop="sellAccountName">
-                  <el-input
-                    v-model="formData.data.sellAccountName"
-                    placeholder="请输入账户名"
-                  />
+                  <el-input v-model="formData.data.sellAccountName" placeholder="请输入账户名" />
                 </el-form-item>
                 <div style="height: 20px"></div>
                 <el-form-item label="账号" prop="sellAccountOpening">
-                  <el-input
-                    v-model="formData.data.sellAccountOpening"
-                    placeholder="请输入账号"
-                  />
+                  <el-input v-model="formData.data.sellAccountOpening" placeholder="请输入账号" />
                 </el-form-item>
               </el-col>
               <el-col :span="1"></el-col>
               <el-col :span="12">
                 <el-form-item label="开户行" prop="sellOpeningBank">
-                  <el-input
-                    v-model="formData.data.sellOpeningBank"
-                    placeholder="请输入开户行"
-                  />
+                  <el-input v-model="formData.data.sellOpeningBank" placeholder="请输入开户行" />
                 </el-form-item>
                 <div style="height: 20px"></div>
                 <el-form-item label="银行号" prop="sellInterbankNumber">
-                  <el-input
-                    v-model="formData.data.sellInterbankNumber"
-                    placeholder="请输入银行号"
-                  />
+                  <el-input v-model="formData.data.sellInterbankNumber" placeholder="请输入银行号" />
                 </el-form-item>
               </el-col>
             </el-row>
@@ -173,34 +107,15 @@
             <el-button type="primary" plain @click="openProduct = true">
               添加明细
             </el-button>
-            <el-table
-              :data="formData.data.salesContractDetailsList"
-              style="margin-top: 10px"
-            >
-              <el-table-column
-                prop="productName"
-                label="产品名称"
-                width="280"
-              />
-              <el-table-column
-                prop="productSpec"
-                label="规格型号"
-                width="100"
-              />
+            <el-table :data="formData.data.salesContractDetailsList" style="margin-top: 10px">
+              <el-table-column prop="productName" label="产品名称" width="280" />
+              <el-table-column prop="productSpec" label="规格型号" width="100" />
               <el-table-column prop="isCustomized" label="是否定制" width="120">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="
+                  <el-form-item :prop="
                       'salesContractDetailsList.' + $index + '.isCustomized'
-                    "
-                    :rules="rules.isCustomized"
-                    :inline-message="true"
-                  >
-                    <el-select
-                      v-model="row.isCustomized"
-                      class="m-2"
-                      placeholder="请选择"
-                    >
+                    " :rules="rules.isCustomized" :inline-message="true">
+                    <el-select v-model="row.isCustomized" class="m-2" placeholder="请选择">
                       <el-option key="1" label="是" value="1" />
                       <el-option key="0" label="否" value="0" />
                     </el-select>
@@ -209,64 +124,33 @@
               </el-table-column>
               <el-table-column prop="unitPrice" label="单价" width="130">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="'salesContractDetailsList.' + $index + '.unitPrice'"
-                    :rules="rules.unitPrice"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.unitPrice"
-                      :precision="2"
-                      :controls="false"
-                      :min="0"
-                      @change="changeAmount"
-                    />
+                  <el-form-item :prop="'salesContractDetailsList.' + $index + '.unitPrice'" :rules="rules.unitPrice" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.unitPrice" :precision="2" :controls="false" :min="0"
+                                     @change="changeAmount" />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="quantity" label="数量" width="130">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="'salesContractDetailsList.' + $index + '.quantity'"
-                    :rules="rules.quantity"
-                    :inline-message="true"
-                  >
-                    <el-input-number
-                      onmousewheel="return false;"
-                      v-model="row.quantity"
-                      :precision="0"
-                      :controls="false"
-                      :min="0"
-                      @change="changeAmount"
-                    />
+                  <el-form-item :prop="'salesContractDetailsList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
+                    <el-input-number onmousewheel="return false;" v-model="row.quantity" :precision="0" :controls="false" :min="0"
+                                     @change="changeAmount" />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="total" label="金额小计" width="100" />
               <el-table-column prop="productRemark" label="备注">
                 <template #default="{ row, $index }">
-                  <el-form-item
-                    :prop="
+                  <el-form-item :prop="
                       'salesContractDetailsList.' + $index + '.productRemark'
-                    "
-                    :rules="rules.productRemark"
-                    :inline-message="true"
-                  >
-                    <el-input
-                      v-model="row.productRemark"
-                      placeholder="请输入"
-                      type="textarea"
-                      :rows="3"
-                    />
+                    " :rules="rules.productRemark" :inline-message="true">
+                    <el-input v-model="row.productRemark" placeholder="请输入" type="textarea" :rows="3" />
                   </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="zip" label="操作" width="60">
                 <template #default="{ $index }">
-                  <el-button type="primary" link @click="handleRemove($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="handleRemove($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -275,13 +159,7 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm()"
-          size="large"
-          :loading="submitLoading"
-          v-if="modalType == 'add'"
-        >
+        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading" v-if="modalType == 'add'">
           确 定
         </el-button>
       </template>
@@ -301,9 +179,7 @@
       <template #footer>
         <el-button @click="openPrint = false" size="large">取消</el-button>
         <el-button v-print="printObj" size="large">打印</el-button>
-        <el-button type="primary" @click="clickDownload()" size="large"
-          >下载PDF</el-button
-        >
+        <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
       </template>
     </el-dialog>
   </div>
@@ -375,12 +251,14 @@ const config = computed(() => {
       attrs: {
         label: "合同号",
         prop: "code",
+        width: 120,
       },
     },
     {
       attrs: {
         label: "客户名称",
         prop: "customerName",
+        "min-width": 200,
       },
     },
 
@@ -388,6 +266,7 @@ const config = computed(() => {
       attrs: {
         label: "合同金额",
         prop: "contractAmount",
+        width: 110,
       },
       render(contractAmount) {
         return proxy.moneyFormat(contractAmount, 2);
@@ -397,18 +276,21 @@ const config = computed(() => {
       attrs: {
         label: "签订时间",
         prop: "createTime",
+        width: 160,
       },
     },
     {
       attrs: {
         label: "交货期限",
         prop: "deliveryDate",
+        width: 110,
       },
     },
     {
       attrs: {
         label: "付款方式",
         prop: "payMethod",
+        width: 100,
       },
       render(payMethod) {
         return proxy.dictValueLabel(payMethod, payMethodData.value);
@@ -418,6 +300,7 @@ const config = computed(() => {
       attrs: {
         label: "运费支付方",
         prop: "freightPayer",
+        width: 100,
       },
       render(freightPayer) {
         return proxy.dictValueLabel(freightPayer, freightPayerData.value);
@@ -444,13 +327,15 @@ const config = computed(() => {
       attrs: {
         label: "备注",
         slot: "remark",
+        width: 120,
       },
     },
     {
       attrs: {
         label: "操作",
-        width: "200",
+        width: "100",
         align: "center",
+        fixed: "right",
       },
       renderHTML(row) {
         return [

+ 163 - 344
src/views/salesMange/salesMange/profitSettlement/index.vue

@@ -1,132 +1,88 @@
 <template>
   <div class="tenant">
-    <byTable
-      :hideTable="true"
-      :hidePagination="true"
-      :source="sourceList.data"
-      :pagination="sourceList.pagination"
-      :config="config"
-      :statConfig="statConfig"
-      :loading="loading"
-      :selectConfig="selectConfig"
-      highlight-current-row
-      :onMoreSearch="true"
-      @moreSearch="clickMoreSearch"
-      :action-list="[]"
-      @get-list="getList"
-    >
+    <byTable :hideTable="true" :hidePagination="true" :source="sourceList.data" :pagination="sourceList.pagination" :config="config"
+             :statConfig="statConfig" :selectConfig="selectConfig" highlight-current-row :onMoreSearch="true" @moreSearch="clickMoreSearch"
+             :action-list="[]" @get-list="getList">
       <!-- {
           text: '默认汇率',
           action: () => openModal(),
         }, -->
     </byTable>
-    <div
-      style="padding: 0 20px 20px 20px; background-color: white"
-      v-if="rateStatus"
-    >
-      <el-table :data="sourceList.data">
-        <el-table-column label="合同编号" prop="code" width="160" fixed />
-        <el-table-column
-          label="客户名称"
-          prop="customerName"
-          min-width="200"
-          fixed
-        />
-        <el-table-column
-          label="收入总计"
-          prop="incomeAmount"
-          width="140"
-          fixed
-        />
-        <el-table-column
-          label="支出总计"
-          prop="expenditureAmount"
-          width="140"
-          fixed
-        />
+    <div style="padding: 0 20px 20px 20px; background-color: white">
+      <el-table :data="sourceList.data" v-loading="loading">
+        <el-table-column label="合同编号" prop="salesContractCode" width="160" fixed />
+        <el-table-column label="客户名称" prop="customerName" min-width="200" fixed />
+        <el-table-column label="收入总计" prop="totalIncome" width="140" fixed />
+        <el-table-column label="支出总计" prop="totalExpenditure" width="140" fixed />
         <el-table-column label="毛利率" width="140" fixed>
           <template #default="{ row }">
-            <div>{{ parseFloat(row.grossRate).toFixed(2) }}%</div>
+            <div>{{ parseFloat(row.grossProfitMargin).toFixed(2) }}%</div>
           </template>
         </el-table-column>
-        <el-table-column label="毛利" prop="gross" width="140" fixed />
+        <el-table-column label="毛利" prop="grossProfit" width="140" fixed />
         <el-table-column label="合同金额" width="140">
           <template #default="{ row }">
-            <div>{{ row.currency }} {{ row.amount }}</div>
+            <div> {{ row.contractAmount }}</div>
           </template>
         </el-table-column>
+
         <el-table-column label="物料成本" width="140">
           <template #default="{ row }">
-            <div>{{ row.currency }} {{ row.amount }}</div>
+            <div> {{ row.materialFee }}</div>
           </template>
         </el-table-column>
 
         <el-table-column label="拖车费" width="140">
           <template #default="{ row }">
-            <div>{{ row.agencyFee }}</div>
+            <div>{{ row.trailerFee }}</div>
           </template>
         </el-table-column>
 
         <el-table-column label="验货红包" width="140">
           <template #default="{ row }">
             <div>
-              {{ row.inspectionRedPack }}
+              {{ row.inspectionRedPackFee }}
             </div>
           </template>
         </el-table-column>
         <el-table-column label="佣金" width="140">
           <template #default="{ row }">
-            <div>{{ row.commission }}</div>
+            <div>{{ row.commissionFee }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="售后成本" width="140">
+          <template #default="{ row }">
+            <div>
+              {{ row.afterSalesFee }}
+            </div>
           </template>
         </el-table-column>
+
         <el-table-column label="其他" width="140">
           <template #default="{ row }">
-            <div>{{ row.other }}</div>
+            <div>{{ row.otherFee }}</div>
           </template>
         </el-table-column>
 
         <el-table-column label="操作" align="center" width="160" fixed="right">
           <template #default="{ row }">
             <div>
-              <el-button type="primary" @click="changeBudget(row)" link
-                >预算</el-button
-              >
+              <el-button type="primary" @click="changeBudget(row)" link>其他支出</el-button>
             </div>
           </template>
         </el-table-column>
       </el-table>
       <el-row style="padding: 20px" justify="end" type="flex">
-        <el-pagination
-          background
-          layout="total, sizes, prev, pager, next, jumper"
-          :current-page="sourceList.pagination.pageNum"
-          :page-size="sourceList.pagination.pageSize"
-          :total="sourceList.pagination.total"
-          @size-change="handleSizeChange"
-          @current-change="handlePageChange"
-        />
+        <el-pagination background layout="total, sizes, prev, pager, next, jumper" :current-page="sourceList.pagination.pageNum"
+                       :page-size="sourceList.pagination.pageSize" :total="sourceList.pagination.total" @size-change="handleSizeChange"
+                       @current-change="handlePageChange" />
       </el-row>
     </div>
 
-    <el-dialog
-      title="默认汇率"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="600"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog title="默认汇率" v-if="dialogVisible" v-model="dialogVisible" width="600">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #currencyList>
-          <el-table
-            :data="formData.data.list"
-            style="width: 100%"
-            v-loading="loadingDialog"
-          >
+          <el-table :data="formData.data.list" style="width: 100%" v-loading="loadingDialog">
             <el-table-column label="币种">
               <template #default="{ row }">
                 <div>{{ dictValueLabel(row.type, accountCurrency) }}</div>
@@ -134,20 +90,9 @@
             </el-table-column>
             <el-table-column label="兑 CHY 汇率">
               <template #default="{ row, $index }">
-                <el-form-item
-                  :prop="'list.' + $index + '.rate'"
-                  :rules="rules.rate"
-                  :inline-message="true"
-                >
-                  <el-input-number
-                    onmousewheel="return false;"
-                    v-model="row.rate"
-                    placeholder="请输入兑 CHY 汇率"
-                    style="width: 100%"
-                    :precision="6"
-                    :controls="false"
-                    :min="0"
-                  />
+                <el-form-item :prop="'list.' + $index + '.rate'" :rules="rules.rate" :inline-message="true">
+                  <el-input-number onmousewheel="return false;" v-model="row.rate" placeholder="请输入兑 CHY 汇率" style="width: 100%" :precision="6"
+                                   :controls="false" :min="0" />
                 </el-form-item>
               </template>
             </el-table-column>
@@ -156,31 +101,14 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="调整汇率"
-      v-if="openChange"
-      v-model="openChange"
-      width="600"
-    >
-      <byForm
-        :formConfig="formChangeConfig"
-        :formOption="formOption"
-        v-model="formChangeData.data"
-        :rules="rules"
-        ref="change"
-      >
+    <el-dialog title="调整汇率" v-if="openChange" v-model="openChange" width="600">
+      <byForm :formConfig="formChangeConfig" :formOption="formOption" v-model="formChangeData.data" :rules="rules" ref="change">
         <template #currencyList>
-          <el-table
-            :data="formChangeData.data.list"
-            style="width: 100%"
-            v-loading="loadingDialog"
-          >
+          <el-table :data="formChangeData.data.list" style="width: 100%" v-loading="loadingDialog">
             <el-table-column label="币种">
               <template #default="{ row }">
                 <div>{{ dictValueLabel(row.type, accountCurrency) }}</div>
@@ -188,20 +116,9 @@
             </el-table-column>
             <el-table-column label="兑 CHY 汇率">
               <template #default="{ row, $index }">
-                <el-form-item
-                  :prop="'list.' + $index + '.rate'"
-                  :rules="rules.rate"
-                  :inline-message="true"
-                >
-                  <el-input-number
-                    onmousewheel="return false;"
-                    v-model="row.rate"
-                    placeholder="请输入兑 CHY 汇率"
-                    style="width: 100%"
-                    :precision="6"
-                    :controls="false"
-                    :min="0"
-                  />
+                <el-form-item :prop="'list.' + $index + '.rate'" :rules="rules.rate" :inline-message="true">
+                  <el-input-number onmousewheel="return false;" v-model="row.rate" placeholder="请输入兑 CHY 汇率" style="width: 100%" :precision="6"
+                                   :controls="false" :min="0" />
                 </el-form-item>
               </template>
             </el-table-column>
@@ -210,150 +127,25 @@
       </byForm>
       <template #footer>
         <el-button @click="openChange = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitChangeForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitChangeForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog title="预算" v-if="openBudget" v-model="openBudget" width="400">
-      <byForm
-        :formConfig="formBudgetConfig"
-        :formOption="formOption"
-        v-model="formBudgetData.data"
-        ref="budget"
-      >
-        <template #budgetMoney>
-          <div style="width: 100%">
-            <el-form-item label="拖车费" prop="trailerFee">
-              <el-input
-                v-model="formBudgetData.data.trailerFee"
-                placeholder="请输入拖车费"
-                class="input-with-select"
-              >
-                <template #prepend>
-                  <el-select
-                    v-model="formBudgetData.data.trailerFeeCurrency"
-                    placeholder="请选择货币"
-                    style="width: 115px"
-                    disabled
-                  >
-                    <el-option
-                      v-for="(item, index) in accountCurrency"
-                      :key="index"
-                      :label="item.label"
-                      :value="item.value"
-                    />
-                  </el-select>
-                </template>
-              </el-input>
-            </el-form-item>
-
-            <el-form-item
-              label="验货红包"
-              prop="inspectionRedPack"
-              style="margin-top: 20px"
-            >
-              <el-input
-                v-model="formBudgetData.data.inspectionRedPack"
-                placeholder="请输入验货红包"
-                class="input-with-select"
-              >
-                <template #prepend>
-                  <el-select
-                    v-model="formBudgetData.data.inspectionRedPackCurrency"
-                    placeholder="请选择货币"
-                    style="width: 115px"
-                    disabled
-                  >
-                    <el-option
-                      v-for="(item, index) in accountCurrency"
-                      :key="index"
-                      :label="item.label"
-                      :value="item.value"
-                    />
-                  </el-select>
-                </template>
-              </el-input>
-            </el-form-item>
-            <el-form-item
-              label="佣金"
-              prop="commission"
-              style="margin-top: 20px"
-            >
-              <el-input
-                v-model="formBudgetData.data.commission"
-                placeholder="请输入佣金"
-                class="input-with-select"
-              >
-                <template #prepend>
-                  <el-select
-                    v-model="formBudgetData.data.commissionCurrency"
-                    placeholder="请选择货币"
-                    style="width: 115px"
-                    disabled
-                  >
-                    <el-option
-                      v-for="(item, index) in accountCurrency"
-                      :key="index"
-                      :label="item.label"
-                      :value="item.value"
-                    />
-                  </el-select>
-                </template>
-              </el-input>
-            </el-form-item>
-            <el-form-item label="其他" prop="other" style="margin-top: 20px">
-              <el-input
-                v-model="formBudgetData.data.other"
-                placeholder="请输入其他"
-                class="input-with-select"
-              >
-                <template #prepend>
-                  <el-select
-                    v-model="formBudgetData.data.otherCurrency"
-                    placeholder="请选择货币"
-                    style="width: 115px"
-                    disabled
-                  >
-                    <el-option
-                      v-for="(item, index) in accountCurrency"
-                      :key="index"
-                      :label="item.label"
-                      :value="item.value"
-                    />
-                  </el-select>
-                </template>
-              </el-input>
-            </el-form-item>
-          </div>
-        </template>
+    <el-dialog title="其他支出" v-if="openBudget" v-model="openBudget" width="400">
+      <byForm :formConfig="formBudgetConfig" :formOption="formOption" :rules="formBudgetRules" v-model="formBudgetData.data" ref="budget">
       </byForm>
       <template #footer>
         <el-button @click="openBudget = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitBudgetForm()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitBudgetForm()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      :title="'高级检索'"
-      v-model="moreSearchDialog"
-      width="500px"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formSearchConfig"
-        :formOption="formOption"
-        v-model="sourceList.pagination"
-      >
+    <el-dialog :title="'高级检索'" v-model="moreSearchDialog" width="500px" destroy-on-close>
+      <byForm :formConfig="formSearchConfig" :formOption="formOption" v-model="sourceList.pagination">
       </byForm>
       <template #footer>
         <el-button @click="moreSearchReset" size="large">重置</el-button>
-        <el-button @click="moreSearchQuery" type="primary" size="large"
-          >搜索</el-button
-        >
+        <el-button @click="moreSearchQuery" type="primary" size="large">搜索</el-button>
       </template>
     </el-dialog>
   </div>
@@ -376,9 +168,8 @@ const sourceList = ref({
     pageNum: 1,
     pageSize: 10,
     keyword: "",
-    userId: "",
-    userName: "",
-    contractCode: "",
+    isSettled: "",
+    salesContractCode: "",
     customerName: "",
     beginTime: "",
     endTime: "",
@@ -405,63 +196,66 @@ const statConfig = computed(() => [
     label: "统计",
     data: [
       //一个卡牌多数据配置
+
+      {
+        label: "收支统计(CNY)",
+        type: 1,
+        data: [
+          {
+            label: "总收入",
+            num: proxy.moneyFormat(headerData.value.totalIncome, 2),
+            color: "#0084ff",
+          },
+          {
+            label: "总支出",
+            num: proxy.moneyFormat(headerData.value.totalExpenditure, 2),
+            color: "#0084ff",
+          },
+          {
+            label: "总毛利",
+            num: proxy.moneyFormat(headerData.value.grossProfit, 2),
+            color: "#0084ff",
+          },
+          {
+            label: "毛利率",
+            num: headerData.value.grossProfitMargin + " %",
+            color: "#0084ff",
+          },
+        ],
+      },
       {
         label: "支出统计(CNY)",
         type: 5,
         data: [
           {
             label: "物料成本",
-            num: proxy.moneyFormat(headerData.value.peritectoidSumAmount, 2),
+            num: proxy.moneyFormat(headerData.value.materialFee, 2),
             color: "#FF6F67",
           },
           {
             label: "拖车费",
-            num: proxy.moneyFormat(headerData.value.trailerFeeSumAmount, 2),
+            num: proxy.moneyFormat(headerData.value.trailerFee, 2),
             color: "#FF6F67",
           },
           {
             label: "验货红包",
-            num: proxy.moneyFormat(
-              headerData.value.inspectionRedPackSumAmount,
-              2
-            ),
+            num: proxy.moneyFormat(headerData.value.inspectionRedPackFee, 2),
             color: "#FF6F67",
           },
           {
             label: "佣金",
-            num: proxy.moneyFormat(headerData.value.commissionSumAmount, 2),
+            num: proxy.moneyFormat(headerData.value.commissionFee, 2),
             color: "#FF6F67",
           },
           {
-            label: "其他",
-            num: proxy.moneyFormat(headerData.value.otherSumAmount, 2),
+            label: "售后成本",
+            num: proxy.moneyFormat(headerData.value.afterSalesFee, 2),
             color: "#FF6F67",
           },
-        ],
-      },
-      {
-        label: "收支统计(CNY)",
-        type: 1,
-        data: [
-          {
-            label: "总收入",
-            num: proxy.moneyFormat(headerData.value.totalIncomeSumAmount, 2),
-            color: "#0084ff",
-          },
-          {
-            label: "总支出",
-            num: proxy.moneyFormat(headerData.value.totalExpensesSumAmount, 2),
-            color: "#0084ff",
-          },
           {
-            label: "总毛利",
-            num: proxy.moneyFormat(headerData.value.grossProfitSum, 2),
-            color: "#0084ff",
-          },
-          {
-            label: "毛利率",
-            num: headerData.value.grossProfitMargin + " %",
-            color: "#0084ff",
+            label: "其他",
+            num: proxy.moneyFormat(headerData.value.otherFee, 2),
+            color: "#FF6F67",
           },
         ],
       },
@@ -508,7 +302,7 @@ const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   proxy
-    .post("/contract/getProfitBudgetPage", sourceList.value.pagination)
+    .post("/settlement/getProfitClearingPage", sourceList.value.pagination)
     .then((res) => {
       sourceList.value.data = res.rows;
       sourceList.value.pagination.total = res.total;
@@ -517,7 +311,7 @@ const getList = async (req) => {
       }, 200);
     });
   proxy
-    .post("/contract/getProfitBudgetHeadStatistic", sourceList.value.pagination)
+    .post("/settlement/getProfitClearingHead", sourceList.value.pagination)
     .then((res) => {
       headerData.value = res;
     });
@@ -551,7 +345,8 @@ const judgeRate = () => {
     }
   );
 };
-getDict();
+getList();
+// getDict();
 const handleSizeChange = (val) => {
   sourceList.value.pagination.pageNum = 1;
   sourceList.value.pagination.pageSize = val;
@@ -748,16 +543,19 @@ const budget = ref(null);
 const formBudgetData = reactive({
   data: {},
 });
+const formBudgetRules = ref({
+  trailerFee: [{ required: true, message: "请输入拖车费", trigger: "blur" }],
+  inspectionRedPackFee: [
+    { required: true, message: "请输入验收红包", trigger: "blur" },
+  ],
+  commissionFee: [{ required: true, message: "请输入佣金", trigger: "blur" }],
+  otherFee: [{ required: true, message: "请输入其他费用", trigger: "blur" }],
+});
 const formBudgetConfig = computed(() => {
   return [
     {
-      type: "title",
-      title: "合同信息",
-      label: "",
-    },
-    {
       type: "input",
-      prop: "code",
+      prop: "salesContractCode",
       label: "合同编号",
       itemType: "text",
       disabled: true,
@@ -770,59 +568,81 @@ const formBudgetConfig = computed(() => {
       disabled: true,
     },
     {
-      type: "input",
-      prop: "userName",
-      label: "业务员",
-      itemType: "text",
-      disabled: true,
+      type: "number",
+      disabled: false,
+      prop: "trailerFee",
+      label: "拖车费",
+      precision: 2,
+
+      controls: false,
+      itemWidth: 100,
+      style: {
+        width: "100%",
+      },
     },
     {
-      type: "title",
-      title: "预算金额",
-      label: "",
+      type: "number",
+      disabled: false,
+      prop: "inspectionRedPackFee",
+      label: "验收红包",
+      precision: 2,
+
+      controls: false,
+      itemWidth: 100,
+      style: {
+        width: "100%",
+      },
     },
     {
-      type: "slot",
-      slotName: "budgetMoney",
-      label: "",
+      type: "number",
+      disabled: false,
+      prop: "commissionFee",
+      label: "佣金",
+      precision: 2,
+
+      controls: false,
+      itemWidth: 100,
+      style: {
+        width: "100%",
+      },
+    },
+    {
+      type: "number",
+      disabled: false,
+      prop: "otherFee",
+      label: "其他费用",
+      precision: 2,
+
+      controls: false,
+      itemWidth: 100,
+      style: {
+        width: "100%",
+      },
     },
   ];
 });
 const changeBudget = (row) => {
-  let currency = "CNY";
-  if (accountCurrency.value && accountCurrency.value.length > 0) {
-    currency = accountCurrency.value[0].value;
-  }
   formBudgetData.data = {
-    contractId: row.contractId,
-    code: row.code,
+    id: row.id,
+    salesContractCode: row.salesContractCode,
     customerName: row.customerName,
-    userName: row.userName,
-    trailerFeeCurrency: currency,
     trailerFee: row.trailerFee,
-    customsFeeCurrency: currency,
-    customsFee: row.customsFee,
-    agencyFeeCurrency: currency,
-    agencyFee: row.agencyFee,
-    portMixedFeeCurrency: currency,
-    portMixedFee: row.portMixedFee,
-    inspectionRedPackCurrency: currency,
-    inspectionRedPack: row.inspectionRedPack,
-    commissionCurrency: currency,
-    commission: row.commission,
-    otherCurrency: currency,
-    other: row.other,
+    inspectionRedPackFee: row.inspectionRedPackFee,
+    commissionFee: row.commissionFee,
+    otherFee: row.otherFee,
   };
   openBudget.value = true;
 };
 const submitBudgetForm = () => {
-  proxy.post("/contractBudget/budget", formBudgetData.data).then(() => {
-    ElMessage({
-      message: "保存成功",
-      type: "success",
+  budget.value.handleSubmit(() => {
+    proxy.post("/settlement/budget", formBudgetData.data).then(() => {
+      ElMessage({
+        message: "保存成功",
+        type: "success",
+      });
+      openBudget.value = false;
+      getList();
     });
-    openBudget.value = false;
-    getList();
   });
 };
 
@@ -831,7 +651,7 @@ const formSearchConfig = computed(() => {
     {
       type: "input",
       label: "合同编号",
-      prop: "contractCode",
+      prop: "salesContractCode",
       itemWidth: 100,
     },
     {
@@ -874,9 +694,8 @@ const moreSearchReset = () => {
     pageNum: sourceList.value.pagination.pageNum,
     pageSize: sourceList.value.pagination.pageSize,
     keyword: "",
-    userId: "",
-    userName: "",
-    contractCode: "",
+    isSettled: "",
+    salesContractCode: "",
     customerName: "",
     beginTime: "",
     endTime: "",