瀏覽代碼

部分新需求

cz 1 年之前
父節點
當前提交
d5dc765350

+ 1 - 1
src/components/byTable/index.vue

@@ -632,7 +632,7 @@ export default defineComponent({
         }
       }
     };
-    const hocElTable = ref();
+    const hocElTable = ref(null);
 
     return {
       tableHeight,

+ 782 - 0
src/components/process/SF/CostControl.vue

@@ -0,0 +1,782 @@
+<template>
+  <div style="width: 100%; padding: 0px 15px">
+    <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
+      <template #commodity>
+        <div style="width: 100%">
+          <el-table :data="formData.data.outboundRecordList" style="width: 100%; ">
+            <!-- v-if="['10'].includes(formData.data.selectType)" -->
+            <el-table-column prop="quantity" label="收付款说明" min-width="200">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input v-model="row.quantity" placeholder="请输入" type="textarea" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="申请事由" min-width="200">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input v-model="row.quantity" placeholder="请输入" type="textarea" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <!-- v-if="['20'].includes(formData.data.selectType)" -->
+            <el-table-column prop="quantity" label="抵扣工资月份" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-date-picker v-model="row.aa" type="month" placeholder="请选择" style="width: 100%" value-format="YYYY-MM" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="结存预付款(含税)" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="结存预付款(不含税)" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="本期预付款(含税)" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="本期预付款(不含税)" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="账期" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-date-picker v-model="row.aa" type="month" placeholder="请选择" style="width: 100%" value-format="YYYY-MM" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="本账期金额(含税)" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="本账期金额(不含税)" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="本账期调整金额" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="抵扣预付款(含税)" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="抵扣预付款(不含税)" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="开票税点" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" :max="100" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="税费" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="发票附件" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-upload :file-list="row.prodFileList" :action="uploadUrl" :data="uploadData" :limit="5" :list-type="'text'"
+                             :before-upload="(file)=>handleBeforeUploadOne(file,$index)" :on-success="()=>handleSuccessOne($index)"
+                             :on-remove="(file)=>handleRemoveFile(file,$index)" :on-preview="onPreviewFile" :on-exceed="()=>msgTip(`上传文件数量不可大于5`, 2)">
+                    <el-button text type="primary">上传</el-button>
+                  </el-upload>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="非发票附件" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-upload :file-list="row.prodFileList" :action="uploadUrl" :data="uploadData" :limit="5" :list-type="'text'"
+                             :before-upload="(file)=>handleBeforeUploadOne(file,$index)" :on-success="()=>handleSuccessOne($index)"
+                             :on-remove="(file)=>handleRemoveFile(file,$index)" :on-preview="onPreviewFile" :on-exceed="()=>msgTip(`上传文件数量不可大于5`, 2)">
+                    <el-button text type="primary">上传</el-button>
+                  </el-upload>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="归还转账截图" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-upload :file-list="row.prodFileList" :action="uploadUrl" :data="uploadData" :limit="5" :list-type="'text'"
+                             :before-upload="(file)=>handleBeforeUploadOne(file,$index)" :on-success="()=>handleSuccessOne($index)"
+                             :on-remove="(file)=>handleRemoveFile(file,$index)" :on-preview="onPreviewFile" :on-exceed="()=>msgTip(`上传文件数量不可大于5`, 2)">
+                    <el-button text type="primary">上传</el-button>
+                  </el-upload>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="收款单位" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
+                    <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
+                  </el-select>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="其他" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
+                    <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
+                  </el-select>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="店铺名称" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
+                    <el-option v-for="item in shopList" :key="item.value" :label="item.label" :value="item.value" />
+                  </el-select>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="供应商" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
+                    <el-option v-for="item in supplierList" :key="item.value" :label="item.label" :value="item.value" />
+                  </el-select>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="费用类型" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
+                    <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
+                  </el-select>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="刷单时间/推广费类别" width="160">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
+                    <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
+                  </el-select>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="刷单时间" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-date-picker v-model="row.aa" type="date" placeholder="请选择" style="width: 100%" value-format="YYYY-MM-DD" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="推广费类别" width="150">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-select v-model="formData.data.sellCorporationId" placeholder="请选择" style="width: 100%" filterable>
+                    <el-option v-for="item in corporationList" :key="item.value" :label="item.label" :value="item.value" />
+                  </el-select>
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="本期应付(抵扣)" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="本期应付(抵扣前)" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="本期应付(抵扣后)" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+
+            <el-table-column prop="quantity" label="本期应付" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+            <el-table-column prop="quantity" label="归还金额" width="140">
+              <template #default="{ row, $index }">
+                <el-form-item :prop="'outboundRecordList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true" class="margin-b-0">
+                  <el-input-number onmousewheel="return false;" v-model="row.quantity" placeholder="请输入" style="width: 100%" :precision="2"
+                                   :controls="false" :min="0" @change="totalAmount()" />
+                </el-form-item>
+              </template>
+            </el-table-column>
+
+            <el-table-column prop="quantity" label="记账科目" width="150">
+              <template #default="{ row, $index }">
+                <div style="width: 100%">
+                  <el-tree-select v-model="formData.data.parentId" :data="sourceList.data" :disabled="modalType=='edit'" check-strictly
+                                  :render-after-expand="false" node-key="deptId" :props="defaultProps" style="width:100%" />
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="核算项目名称" width="110" prop="amount" />
+            <el-table-column label="核算项目" width="100" prop="amount" />
+            <el-table-column label="记账金额" width="100" prop="amount" />
+
+          </el-table>
+        </div>
+      </template>
+    </byForm>
+  </div>
+</template>
+
+<script setup>
+import byForm from "@/components/byForm/index";
+const route = useRoute();
+// 接收父组件的传值
+const props = defineProps({
+  queryData: Object,
+});
+const { proxy } = getCurrentInstance();
+const frontLinesData = computed(
+  () => proxy.useUserStore().allDict["front_lines"]
+);
+const statusData = ref([]);
+const treeData = ref([]);
+const deptData = ref([]);
+const userList = ref([]);
+const accountList = ref([]);
+const shopList = ref([]);
+const supplierList = ref([]);
+const isAfterSubmit = ref([
+  {
+    label: "是",
+    value: 1,
+  },
+  {
+    label: "否",
+    value: 0,
+  },
+]);
+const isAfterSubmitOne = ref([
+  {
+    label: "店铺充值",
+    value: 1,
+  },
+  {
+    label: "转账",
+    value: 0,
+  },
+]);
+
+const formData = reactive({
+  data: {},
+});
+const formDom = ref(null);
+const judgeStatus = () => {
+  if (route.query.processType == 20 || route.query.processType == 10) {
+    return true;
+  }
+  if (props.queryData.recordList && props.queryData.recordList.length > 0) {
+    let data = props.queryData.recordList.filter(
+      (item) => item.status === 2 && item.nodeType !== 1
+    );
+    if (data && data.length > 0) {
+      return true;
+    }
+  }
+  return false;
+};
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  disabled: false,
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title",
+      title: "基本信息",
+      haveLine: false,
+    },
+    {
+      type: "select",
+      label: "收付款类型",
+      prop: "status",
+      itemWidth: 25,
+      data: statusData.value,
+      // clearable: true,
+    },
+    {
+      type: "input",
+      prop: "documentaryRemark",
+      label: "记账凭证号",
+      itemType: "text",
+      disabled: false,
+      itemWidth: 25,
+      // isShow: !["100"].includes(formData.data.selectType),
+    },
+    {
+      type: "select",
+      label: "是否预付",
+      prop: "status",
+      itemWidth: 25,
+      data: isAfterSubmit.value,
+      // clearable: true,
+      // isShow: !["10", "20", "100"].includes(formData.data.selectType),
+    },
+    {
+      type: "date",
+      itemType: "datetime",
+      prop: "documentaryTime",
+      label: "申请日期",
+      disabled: false,
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "documentaryRemark",
+      label: "流水号",
+      itemType: "text",
+      disabled: false,
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      label: "快递公司",
+      prop: "status",
+      itemWidth: 25,
+      data: statusData.value,
+      // clearable: true,
+      // isShow: ["10", "100"].includes(formData.data.selectType),
+    },
+    {
+      type: "input",
+      prop: "documentaryRemark",
+      label: "开票税点",
+      itemType: "text",
+      disabled: false,
+      itemWidth: 25,
+    },
+    {
+      type: "select",
+      prop: "devUserId",
+      label: "申请人",
+      required: true,
+      filterable: true,
+      data: userList.value,
+      itemWidth: 25,
+      // isShow: !["10", "100"].includes(formData.data.selectType),
+    },
+    {
+      type: "select",
+      label: "是否后提交凭证",
+      prop: "status",
+      itemWidth: 25,
+      data: isAfterSubmit.value,
+      // clearable: true,
+      // isShow: !["10", "20", "100"].includes(formData.data.selectType),
+    },
+    {
+      type: "treeSelect",
+      prop: "companyId",
+      label: "业务公司",
+      data: treeData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 25,
+      fn: (val) => {
+        getDeptData(val);
+      },
+    },
+
+    {
+      type: "treeSelect",
+      prop: "deptId",
+      label: "业务部门",
+      data: deptData.value,
+      propsTreeLabel: "deptName",
+      propsTreeValue: "deptId",
+      itemWidth: 25,
+    },
+    {
+      type: "title",
+      title: "收付款明细",
+      haveLine: true,
+    },
+    {
+      type: "slot",
+      slotName: "commodity",
+      label: "",
+    },
+    {
+      type: "title",
+      title: "收付款信息",
+      haveLine: true,
+    },
+    {
+      type: "select",
+      label: "是否公出转出",
+      prop: "status",
+      itemWidth: 25,
+      data: isAfterSubmit.value,
+      // clearable: true,
+      // isShow: !["10", "20", "100"].includes(formData.data.selectType),
+    },
+    {
+      type: "select",
+      label: "付款方式",
+      prop: "status",
+      itemWidth: 25,
+      data: isAfterSubmitOne.value,
+      // clearable: true,
+      // isShow: !["10", "20", "100"].includes(formData.data.selectType),
+    },
+    {
+      type: "input",
+      prop: "openingBank",
+      label: "充值店铺名称",
+      itemWidth: 25,
+      disabled: true,
+    },
+    {
+      type: "select",
+      prop: "shroffAccountId",
+      label: "公司公户",
+      data: accountList.value,
+      itemWidth: 25,
+      fn: (val) => {
+        changeShroffAccount(val);
+      },
+    },
+    {
+      type: "input",
+      prop: "openingBank",
+      label: "开户行",
+      placeholder: "请输入开户行",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "accountName",
+      label: "开户名",
+      placeholder: "请输入开户名",
+      itemWidth: 25,
+    },
+    {
+      type: "input",
+      prop: "accountOpening",
+      label: "账号",
+      placeholder: "请输入账号",
+      itemWidth: 25,
+    },
+  ];
+});
+const rules = ref({
+  quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
+});
+
+const changeShroffAccount = (val) => {
+  if (val) {
+    let data = accountList.value.find((item) => item.value == val);
+    if (data) {
+      formData.data.accountName = data.name;
+      formData.data.openingBank = data.openingBank;
+      formData.data.accountOpening = data.accountOpening;
+    }
+  }
+};
+
+const getDeptData = (val) => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: proxy.useUserStore().user.tenantId,
+      companyId: val,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      ancestors: val,
+      tenantId: proxy.useUserStore().user.tenantId,
+      // type: 2,
+    })
+    .then((res) => {
+      deptData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+
+const getDict = () => {
+  proxy
+    .post("/accountManagement/page", { pageNum: 1, pageSize: 999 })
+    .then((res) => {
+      accountList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.alias,
+          value: item.id,
+        };
+      });
+    });
+
+  proxy.post("/shopInfo/page", { pageNum: 1, pageSize: 9999 }).then((res) => {
+    shopList.value = res.rows.map((item) => {
+      return {
+        ...item,
+        label: item.alias,
+        value: item.id,
+      };
+    });
+  });
+
+  proxy
+    .post("/supplierInfo/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      supplierList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.name,
+          value: item.id,
+        };
+      });
+    });
+
+  proxy
+    .get("/tenantDept/list", {
+      pageNum: 1,
+      pageSize: 9999,
+      keyword: "",
+      tenantId: proxy.useUserStore().user.tenantId,
+      type: 0,
+    })
+    .then((res) => {
+      treeData.value = proxy.handleTree(res.data, "deptId");
+    });
+};
+getDict();
+
+const totalAmount = () => {
+  let money = 0;
+  if (
+    formData.data.outboundRecordList &&
+    formData.data.outboundRecordList.length > 0
+  ) {
+    for (let i = 0; i < formData.data.outboundRecordList.length; i++) {
+      formData.data.outboundRecordList[i].amount = parseFloat(
+        Number(formData.data.outboundRecordList[i].quantity) *
+          Number(formData.data.outboundRecordList[i].price)
+      ).toFixed(2);
+      money = parseFloat(
+        Number(money) + Number(formData.data.outboundRecordList[i].amount)
+      ).toFixed(2);
+    }
+  }
+  formData.data.amount = money;
+};
+
+const handleSubmit = async () => {
+  let flag = await formDom.value.handleSubmit(() => {});
+  if (flag) {
+    if (
+      formData.data.outboundRecordList &&
+      formData.data.outboundRecordList.length > 0
+    ) {
+      let total = 0;
+      for (let i = 0; i < formData.data.outboundRecordList.length; i++) {
+        const ele = formData.data.outboundRecordList[i];
+        total += Number(ele.quantity);
+        if (
+          Number(ele.quantity) + Number(ele.saleOutboundQuantity) >
+          Number(ele.orderQuantity)
+        ) {
+          proxy.msgTip("出库数量加已出库数量不能大于订单数量", 2);
+          return false;
+        }
+      }
+      if (!(total > 0)) {
+        proxy.msgTip("出库数量不能为0", 2);
+        return false;
+      }
+    }
+    return true;
+  } else {
+    setTimeout(() => {
+      const errorDiv = document.getElementsByClassName("is-error");
+      errorDiv[0].scrollIntoView();
+    }, 0);
+  }
+  return flag;
+};
+
+const getFormData = () => {
+  return proxy.deepClone(formData.data);
+};
+// 向父组件暴露
+defineExpose({
+  getFormData,
+  handleSubmit,
+});
+
+const getAllData = (businessId) => {
+  let obj = {};
+  if (route.query && route.query.obj) {
+    obj = JSON.parse(route.query.obj);
+  }
+  proxy.post("/contract/detail", { id: businessId }).then((res) => {
+    formData.data = {
+      contractId: businessId,
+      outboundRecordList: res.contractProductList.map((x) => ({
+        ...x,
+        contractProductId: x.id,
+        orderQuantity: x.quantity,
+        quantity: obj[x.id] || null,
+        amount: "",
+      })),
+      amount: "",
+    };
+    totalAmount();
+    if (
+      formData.data.outboundRecordList &&
+      formData.data.outboundRecordList.length > 0
+    ) {
+      let productIds = formData.data.outboundRecordList.map((x) => x.productId);
+      proxy.getFileData({
+        businessIdList: productIds,
+        data: formData.data.outboundRecordList,
+        att: "productId",
+        businessType: "0",
+        fileAtt: "fileList",
+        filePathAtt: "fileUrl",
+      });
+    }
+  });
+};
+
+onMounted(() => {
+  formOption.disabled = judgeStatus();
+  if (route.query && route.query.businessId && !route.query.processType) {
+    let businessId = route.query.businessId;
+    getAllData(businessId);
+  } else if (route.query && route.query.businessId && route.query.processType) {
+    proxy
+      .post("/contractOutboundInfo/detail", { id: route.query.businessId })
+      .then((res) => {
+        formData.data = res;
+        totalAmount();
+        if (
+          formData.data.outboundRecordList &&
+          formData.data.outboundRecordList.length > 0
+        ) {
+          let productIds = formData.data.outboundRecordList.map(
+            (x) => x.productId
+          );
+          proxy.getFileData({
+            businessIdList: productIds,
+            data: formData.data.outboundRecordList,
+            att: "productId",
+            businessType: "0",
+            fileAtt: "fileList",
+            filePathAtt: "fileUrl",
+          });
+        }
+      });
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+.table {
+  border-collapse: collapse;
+  border-spacing: 0;
+
+  td {
+    text-align: center;
+    padding: 2px 4px;
+    // padding: 5px 10px;
+  }
+}
+.small-title {
+  padding-left: 15px;
+  margin-bottom: 10px;
+  color: #3366ff;
+  font-size: 14px;
+}
+:deep(.el-checkbox) {
+  margin-right: 0px;
+}
+// :deep(.el-collapse-item) {
+//   margin-bottom: 10px;
+// }
+:deep(.el-collapse-item__header) {
+  background-color: #eee;
+}
+</style>

+ 3 - 3
src/components/process/SF/SalesOutBound.vue

@@ -85,9 +85,9 @@ const formOption = reactive({
 const formConfig = computed(() => {
   return [
     {
-      type: "title1",
+      type: "title",
       title: "商品信息",
-      haveLine: true,
+      haveLine: false,
     },
     {
       type: "slot",
@@ -95,7 +95,7 @@ const formConfig = computed(() => {
       label: "",
     },
     {
-      type: "title1",
+      type: "title",
       title: "出库总金额",
       haveLine: true,
     },

+ 326 - 0
src/views/EHSD/saleContract/accountingSubjects/index.vue

@@ -0,0 +1,326 @@
+<template>
+  <div class="pageIndexClass">
+    <byTable :hideTable="true" :hidePagination="true" :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="false"
+             highlight-current-row :action-list="[
+        {
+          text: '添加',
+          action: () => openModal(),
+        },
+      ]" @get-list="getList">
+    </byTable>
+    <div style="padding: 0 20px 20px 20px; background-color: white">
+      <el-table v-loading="loading" :data="sourceList.data" row-key="id" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+                default-expand-all>
+        <el-table-column prop="subjectsName" label="名称" />
+        <el-table-column prop="calculateItemName" label="核算项目名称" />
+        <el-table-column prop="remark" label="备注" />
+        <el-table-column prop="sort" label="排序" width="100" />
+        <el-table-column label="创建时间" align="left" prop="createTime" width="160">
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="200">
+          <template #default="{ row }">
+            <el-button link type="primary" @click="getDtl(row)">修改</el-button>
+            <el-button link type="primary" @click="openModal(row)">添加子项</el-button>
+            <!-- <el-button link type="primary" @click="openRoomModal(row)">权限</el-button> -->
+            <el-button link type="primary" @click="listDelete(row)">删除</el-button>
+            <!-- v-if="checkIsTopData(row.parentId)" -->
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '添加科目' : '编辑科目'" v-if="dialogVisible" v-model="dialogVisible" width="500" v-loading="loadingDialog">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
+        <!-- <template #parentId>
+          <div style="width: 100%">
+            <el-tree-select v-model="formData.data.parentId" :data="sourceList.data" :disabled="modalType=='edit'" check-strictly
+                            :render-after-expand="false" node-key="deptId" :props="defaultProps" style="width:100%" />
+          </div>
+        </template> -->
+        <!-- <template #orderNum>
+          <div style="width: 100%">
+            <el-input-number v-model="formData.data.orderNum" placeholder="请输入排序" style="width: 100%" :precision="0" :controls="false" :min="0"
+                             :max="99999" />
+          </div>
+        </template> -->
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="default">确 定</el-button>
+      </template>
+    </el-dialog>
+
+    <el-dialog title="权限配置" v-if="roomDialogVisible" v-model="roomDialogVisible" width="500" v-loading="loading">
+      <el-tree :data="treeData" show-checkbox node-key="id" :default-checked-keys="checkTreeData" :props="defaultPropsOne" ref="tree"> </el-tree>
+      <template #footer>
+        <el-button @click="roomDialogVisible = false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitTree()" size="default" :loading="submitLoading">确 定</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref, watch } from "vue";
+import byTable from "@/components/byTable/index";
+import { ElMessage, ElMessageBox } from "element-plus";
+import byForm from "@/components/byForm/index";
+import useUserStore from "@/store/modules/user";
+
+const { proxy } = getCurrentInstance();
+
+const defaultProps = {
+  children: "children",
+  label: "subjectsName",
+};
+const defaultPropsOne = {
+  children: "children",
+  label: "label",
+};
+const userList = ref([]);
+const typeList = ref([
+  {
+    label: "公司",
+    value: 0,
+  },
+  // {
+  //   label: "业务中心",
+  //   value: 1,
+  // },
+  {
+    label: "科目",
+    value: 2,
+  },
+  {
+    label: "组",
+    value: 3,
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 9999,
+    keyword: "",
+    tenantId: useUserStore().user.tenantId,
+  },
+});
+const loading = ref(false);
+const config = computed(() => {
+  return [];
+});
+const getDict = () => {
+  proxy
+    .get("/tenantUser/list", {
+      pageNum: 1,
+      pageSize: 10000,
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      userList.value = res.rows.map((item) => {
+        return {
+          label: item.nickName,
+          value: item.userId,
+        };
+      });
+    });
+};
+const deptAllData = ref([]);
+const getList = (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/accountSubjects/list", sourceList.value.pagination)
+    .then((res) => {
+      deptAllData.value = res;
+      sourceList.value.data = proxy.handleTree(res, "id");
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+// getDict();
+getList();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 110,
+  itemWidth: 100,
+  rules: [],
+});
+const formData = reactive({
+  data: {},
+});
+const formConfig = computed(() => {
+  return [
+    // {
+    //   type: "slot",
+    //   prop: "parentId",
+    //   slotName: "parentId",
+    //   label: "上级科目",
+    // },
+    {
+      type: "input",
+      prop: "subjectsName",
+      label: "名称",
+    },
+    {
+      type: "input",
+      prop: "calculateItemName",
+      label: "核算项目名称",
+    },
+    // {
+    //   type: "slot",
+    //   prop: "orderNum",
+    //   slotName: "orderNum",
+    //   label: "科目排序",
+    // },
+    {
+      type: "number",
+      prop: "sort",
+      label: "排序",
+      precision: 0,
+      min: 0,
+      controls: false,
+      // itemWidth: 50,
+      disabled: false,
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "remark",
+      label: "备注",
+    },
+  ];
+});
+const rules = ref({
+  subjectsName: [{ required: true, message: "请输入名称", trigger: "blur" }],
+  sort: [{ required: true, message: "请输入科目排序", trigger: "blur" }],
+});
+const disabledType = ref(false);
+const openModal = (row) => {
+  disabledType.value = false;
+  modalType.value = "add";
+  formData.data = {
+    parentId: "",
+  };
+  if (row && row.id) {
+    formData.data.parentId = row.id;
+  }
+  loadingDialog.value = false;
+  dialogVisible.value = true;
+};
+
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    loadingDialog.value = true;
+    proxy
+      .post("/accountSubjects/" + modalType.value, formData.data)
+      .then(() => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        getList();
+      });
+  });
+};
+
+const listDelete = (row) => {
+  proxy
+    .msgConfirm()
+    .then((res) => {
+      proxy
+        .post("/accountSubjects/delete", {
+          id: row.id,
+        })
+        .then((res) => {
+          proxy.msgTip("操作成功", 1);
+          getList();
+        });
+    })
+    .catch((err) => {});
+};
+const isTopData = ref(false);
+const checkIsTopData = (parentId) => {
+  return deptAllData.value.some((x) => x.id == parentId);
+};
+
+const getDtl = (row) => {
+  formData.data = proxy.deepClone(row);
+  modalType.value = "edit";
+  dialogVisible.value = true;
+};
+
+const tree = ref(null);
+const roomDialogVisible = ref(false);
+const treeData = ref([]);
+const checkTreeData = ref([]);
+const rowTenantId = ref("");
+const getSubset = (list, data) => {
+  for (let i = 0; i < list.length; i++) {
+    if (list[i].children && list[i].children.length > 0) {
+      getSubset(list[i].children, data);
+    } else {
+      data.push(list[i].id);
+    }
+  }
+  return data;
+};
+const openRoomModal = (row) => {
+  if (row.parentId == "0") {
+    rowTenantId.value = row.tenantId;
+  } else {
+    rowTenantId.value = row.deptId;
+  }
+  proxy
+    .get("/tenantInfo/roleMenuTreeSelect/" + rowTenantId.value)
+    .then((res) => {
+      if (res.code == 200) {
+        treeData.value = res.menus;
+        let data = getSubset(res.menus, []);
+        checkTreeData.value = res.checkedKeys.filter((item) => {
+          return data.some((i) => item == i);
+        });
+        roomDialogVisible.value = true;
+      }
+    });
+};
+const noRepeat = (arr) => {
+  var newArr = [...new Set(arr)];
+  return newArr;
+};
+
+const submitTree = () => {
+  let data = noRepeat(
+    tree.value.getHalfCheckedKeys().concat(tree.value.getCheckedKeys())
+  );
+  if (data.length == 0) {
+    ElMessage({
+      message: "请至少选择一个菜单",
+      type: "error",
+    });
+    return;
+  }
+  proxy
+    .post("/tenantInfo/bindingMenu", {
+      tenantId: rowTenantId.value,
+      menuIdList: data,
+    })
+    .then((res) => {
+      ElMessage({
+        message: "保存成功",
+        type: "success",
+      });
+      roomDialogVisible.value = false;
+    });
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+</style>

+ 1 - 1
src/views/EHSD/saleContract/collectionClaim/index.vue

@@ -138,7 +138,7 @@ const config = computed(() => {
       attrs: {
         label: "关联合同",
         slot: "contract",
-        width: 200,
+        width: 220,
         fixed: "left",
       },
     },

+ 6 - 6
src/views/EHSD/saleContract/collectionRegistration/index.vue

@@ -169,7 +169,7 @@ const config = computed(() => {
       attrs: {
         label: "关联合同",
         slot: "contract",
-        width: 200,
+        width: 220,
         fixed: "left",
       },
     },
@@ -456,10 +456,10 @@ const rules = ref({
   transactionTime: [
     { required: true, message: "请选择交易日期", trigger: "change" },
   ],
-  serialNumber: [
-    { required: true, message: "请输入交易流水号", trigger: "blur" },
-  ],
-  remarks: [{ required: true, message: "请输入交易摘要", trigger: "blur" }],
+  // serialNumber: [
+  //   { required: true, message: "请输入交易流水号", trigger: "blur" },
+  // ],
+  // remarks: [{ required: true, message: "请输入交易摘要", trigger: "blur" }],
   name: [{ required: true, message: "请输入付款人", trigger: "blur" }],
   accountOpening: [
     { required: true, message: "请输入付款账号", trigger: "blur" },
@@ -485,7 +485,7 @@ const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   proxy
-    .post("/claim/claimInfoConfirmPage", sourceList.value.pagination)
+    .post("/claim/claimInfoPage", sourceList.value.pagination)
     .then((res) => {
       sourceList.value.data = res.rows;
       sourceList.value.pagination.total = res.total;

+ 23 - 13
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -7,7 +7,7 @@
             text: '新建',
             action: () => newContract(),
           },
-        ]" @get-list="getList">
+        ]" @get-list="getList" ref="tableDom">
         <template #code="{ item }">
           <div style="width: 100%">
             <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="openDetails(item)">{{ item.code }}</a>
@@ -74,9 +74,10 @@
               </div>
               <template #reference>
                 <div style="display:flex;height:70px;position:relative;top:20px">
-                  <div v-for="(product,index) in item.contractProductList" :key="product.id" style="margin-right:10px;position:relative;">
+                  <div v-for="(product,index) in item.contractProductList" :key="product.id"
+                       style="margin-right:10px;position:relative;width:80px;text-align:center;flex: 0 0 80px;">
                     <!-- <el-badge :value="product.quantity" :min="0" :max="999999" v-if="index<3"> -->
-                    <div class="badge">{{product.quantity}}/{{product.finishQuantity||0}}</div>
+                    <div class="badge">{{product.quantity}} / {{product.finishQuantity||0}}</div>
                     <img :src="product.productImgUrl" class="pic" @click="handleClickFile(product.productImgUrl)">
                     <!-- </el-badge> -->
                     <div v-if="index==3" class="more">
@@ -714,6 +715,14 @@ const config = computed(() => {
   return [
     {
       attrs: {
+        label: "合同号",
+        slot: "code",
+        width: 140,
+        fixed: "left",
+      },
+    },
+    {
+      attrs: {
         label: "业务公司",
         prop: "ofCompanyName",
         width: 110,
@@ -743,13 +752,7 @@ const config = computed(() => {
         return proxy.dictKeyValue(val, processingMethod.value);
       },
     },
-    {
-      attrs: {
-        label: "合同号",
-        slot: "code",
-        width: 140,
-      },
-    },
+
     // {
     //   attrs: {
     //     label: "工厂",
@@ -852,7 +855,7 @@ const config = computed(() => {
       attrs: {
         label: "商品数据",
         slot: "product",
-        "min-width": 240,
+        "min-width": 370,
       },
     },
     // {
@@ -1017,7 +1020,7 @@ const config = computed(() => {
       },
       renderHTML(row) {
         return [
-          row.status == 30 &&
+          (row.status == 30 || row.status == 75) &&
           (row.orderDistributeStatus == 0 || row.orderDistributeStatus == 2) &&
           row.processingMethod == 20
             ? {
@@ -1986,9 +1989,11 @@ const onShowProductData = (item) => {
   productData.value = item.contractProductList;
 };
 
+const tableDom = ref(null);
 onMounted(() => {
   $bus.on("refreshTableData", () => {
     getList();
+    tableDom.value.hocElTable.value.doLayout();
   });
 });
 
@@ -2060,6 +2065,7 @@ const submitTermination = () => {
 const uploadFormData = reactive({
   data: {},
 });
+
 const clickUpload = (row) => {
   let businessId = row.id;
   uploadFormData.data = {
@@ -2422,6 +2428,7 @@ const objectSpanMethod = ({ rowIndex, columnIndex }) => {
   padding: 4px;
   color: #fff;
 }
+
 .badge {
   padding: 6px;
   font-size: 12px;
@@ -2435,6 +2442,9 @@ const objectSpanMethod = ({ rowIndex, columnIndex }) => {
   // margin-top: -2px;
   position: absolute;
   top: -19px;
-  right: 0;
+  // left: 5px;
+  // transform: translateX(-50%);
+  // width: calc(100% - 10px);
+  width: 100%;
 }
 </style>

+ 11 - 10
src/views/MES/productionTask/index.vue

@@ -624,10 +624,10 @@ const handlePageTabChange = (val) => {
     sourceList.value.pagination.produceStatus = "";
   }
   if (lastPageActiveName.value == "1") {
-    sourceList.value.pagination.isScheduling = "";
+    sourceList.value.pagination.isHand = "";
   }
   if (val != "1") {
-    sourceList.value.pagination.isScheduling = "";
+    sourceList.value.pagination.isHand = "";
   }
   selectIds.value = [];
   switch (val) {
@@ -665,7 +665,7 @@ const sourceList = ref({
     beginTime: "",
     endTime: "",
     isOverdue: "",
-    isScheduling: "",
+    isHand: "",
     schedulingDate: "",
   },
 });
@@ -1204,7 +1204,7 @@ const getTableList = (req) => {
   //   ...req,
   // };
   if (pageActiveName.value == "1") {
-    sourceList.value.pagination.isScheduling = "0";
+    sourceList.value.pagination.isHand = "1";
   }
 
   if (pageActiveName.value == "2") {
@@ -1226,7 +1226,7 @@ const getTableList = (req) => {
 const taskCountObj = ref({});
 const getTaskCount = (req) => {
   if (pageActiveName.value == "1") {
-    sourceList.value.pagination.isScheduling = "0";
+    sourceList.value.pagination.isHand = "1";
   }
 
   if (pageActiveName.value == "2") {
@@ -1243,7 +1243,7 @@ getTaskCount();
 const getList = async () => {
   // sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   if (pageActiveName.value == "1") {
-    sourceList.value.pagination.isScheduling = "0";
+    sourceList.value.pagination.isHand = "1";
   }
 
   if (pageActiveName.value == "2") {
@@ -1346,11 +1346,11 @@ const searchReset = () => {
     beginTime: "",
     endTime: "",
     isOverdue: "",
-    isScheduling: "",
+    isHand: "",
     schedulingDate: "",
   };
   if (pageActiveName.value == "1") {
-    sourceList.value.pagination.isScheduling = "0";
+    sourceList.value.pagination.isHand = "1";
   } else if (pageActiveName.value == "2") {
     sourceList.value.pagination.produceStatus = "2,5,10";
   }
@@ -1358,7 +1358,6 @@ const searchReset = () => {
 };
 
 const printList = ref([]);
-
 const selectIds = ref([]);
 const selectRow = (data) => {
   selectIds.value = data.map((x) => x.id);
@@ -1950,7 +1949,9 @@ const submitSchedulingForm = () => {
     );
   });
 };
-
+const currentDate = computed(
+  () => schedulingFormData.data.list.map((x) => x.schedulingDate) || []
+);
 const disabledFn = (date) => {
   // 当前日期
   let current = moment(date).format("yyyy-MM-DD");

+ 73 - 53
src/views/finance/fundManage/account/index.vue

@@ -165,6 +165,17 @@ const config = computed(() => {
   ];
 });
 const corporationList = ref([]);
+const typeData = ref([
+  {
+    label: "公账",
+    value: 1,
+  },
+  {
+    label: "私账",
+    value: 2,
+  },
+]);
+
 const getDict = () => {
   proxy
     .post("/dictTenantData/page", {
@@ -211,7 +222,7 @@ const loadingDialog = ref(false);
 const submit = ref(null);
 const formOption = reactive({
   inline: true,
-  labelWidth: 190,
+  labelWidth: 100,
   itemWidth: 100,
   rules: [],
 });
@@ -226,6 +237,14 @@ const formConfig = computed(() => {
       prop: "corporationId",
       label: "企业信息",
       data: corporationList.value,
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "type",
+      label: "类型",
+      data: typeData.value,
+      itemWidth: 50,
     },
     {
       type: "input",
@@ -267,58 +286,58 @@ const formConfig = computed(() => {
       itemWidth: 50,
       itemType: "text",
     },
-    {
-      type: "title1",
-      title: "外汇信息",
-    },
-    {
-      type: "input",
-      prop: "beneficiaryName",
-      label: "Beneficiary Name",
-      required: true,
-      itemType: "text",
-      itemWidth: 50,
-    },
-    {
-      type: "input",
-      prop: "beneficiaryBank",
-      label: "Beneficiary Bank",
-      required: true,
-      itemType: "text",
-      itemWidth: 50,
-    },
-    {
-      type: "input",
-      prop: "beneficiaryBankAddress",
-      label: "Beneficiary Bank Address",
-      required: true,
-      itemType: "text",
-      itemWidth: 50,
-    },
-    {
-      type: "input",
-      prop: "beneficiaryAccountNumber",
-      label: "Beneficiary Account Number",
-      required: true,
-      itemType: "text",
-      itemWidth: 50,
-    },
-    {
-      type: "input",
-      prop: "swiftCode",
-      label: "Swift Code",
-      required: true,
-      itemType: "text",
-      itemWidth: 50,
-    },
-    {
-      type: "input",
-      prop: "beneficiaryAddress",
-      label: "Beneficiary Address",
-      required: true,
-      itemType: "text",
-      itemWidth: 50,
-    },
+    // {
+    //   type: "title1",
+    //   title: "外汇信息",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryName",
+    //   label: "Beneficiary Name",
+    //   required: true,
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryBank",
+    //   label: "Beneficiary Bank",
+    //   required: true,
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryBankAddress",
+    //   label: "Beneficiary Bank Address",
+    //   required: true,
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryAccountNumber",
+    //   label: "Beneficiary Account Number",
+    //   required: true,
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "swiftCode",
+    //   label: "Swift Code",
+    //   required: true,
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryAddress",
+    //   label: "Beneficiary Address",
+    //   required: true,
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
     // {
     //   type: "title1",
     //   title: "账户余额",
@@ -340,6 +359,7 @@ const rules = ref({
   corporationId: [
     { required: true, message: "请选择业务公司", trigger: "change" },
   ],
+  type: [{ required: true, message: "请选择类型", trigger: "change" }],
 });
 const formData = reactive({
   data: {

+ 482 - 0
src/views/finance/fundManage/costControl/index.vue

@@ -0,0 +1,482 @@
+<template>
+  <div class="pageIndexClass">
+    <div class="content">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :action-list="[
+          {
+            text: '添加',
+            action: () => openModal('add'),
+          },
+        ]" @get-list="getList">
+      </byTable>
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '添加账户' : '编辑账户'" v-if="dialogVisible" v-model="dialogVisible" width="60%">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+        <template #balance>
+          <div style="width: 100%">
+            <el-button type="primary" @click="clickBalance">添加</el-button>
+            <el-table :data="formData.data.accountRemainderList" style="width: 100%; margin-top: 16px">
+              <el-table-column label="币种">
+                <template #default="{ row, $index }">
+                  <el-form-item :prop="'accountRemainderList.' + $index + '.currency'" :rules="rules.currency" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-select v-model="row.currency" placeholder="请选择币种" style="width: 100%" :disabled="row.id">
+                      <el-option v-for="item in accountCurrency" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+                    </el-select>
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column label="余额">
+                <template #default="{ row, $index }">
+                  <el-form-item :prop="'accountRemainderList.' + $index + '.remainder'" :rules="rules.remainder" :inline-message="true"
+                                class="margin-b-0 wid100">
+                    <el-input-number onmousewheel="return false;" v-model="row.remainder" placeholder="请输入余额" style="width: 100%" :precision="2"
+                                     :controls="false" :min="0" :disabled="row.id" />
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作" width="80">
+                <template #default="{ row, $index }">
+                  <el-button type="primary" link @click="handleRemove($index)" v-if="!row.id">删除</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+        </template>
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="default">确 定</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import useUserStore from "@/store/modules/user";
+import { ElMessage, ElMessageBox } from "element-plus";
+
+const { proxy } = getCurrentInstance();
+const accountCurrency = ref([]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+  },
+});
+const loading = ref(false);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "企业信息",
+        prop: "corporationName",
+      },
+    },
+    {
+      attrs: {
+        label: "账户别名",
+        prop: "alias",
+      },
+    },
+    {
+      attrs: {
+        label: "开户银行",
+        prop: "openingBank",
+      },
+    },
+    {
+      attrs: {
+        label: "账户名",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "账号",
+        prop: "accountOpening",
+      },
+    },
+    {
+      attrs: {
+        label: "联行号",
+        prop: "interbankNumber",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              update(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
+                proxy
+                  .post("/accountManagement/delete", {
+                    id: row.id,
+                  })
+                  .then(() => {
+                    ElMessage({
+                      message: "删除成功",
+                      type: "success",
+                    });
+                    getList();
+                  });
+              });
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const corporationList = ref([]);
+const typeData = ref([
+  {
+    label: "公账",
+    value: 1,
+  },
+  {
+    label: "私账",
+    value: 2,
+  },
+]);
+
+const getDict = () => {
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "account_currency",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        accountCurrency.value = res.rows;
+      }
+    });
+  proxy
+    .post("/corporation/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      corporationList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.name,
+          value: item.id,
+        };
+      });
+    });
+};
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/accountManagement/page", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+getDict();
+getList();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
+      type: "select",
+      prop: "corporationId",
+      label: "企业信息",
+      data: corporationList.value,
+      itemWidth: 50,
+    },
+    {
+      type: "select",
+      prop: "type",
+      label: "类型",
+      data: typeData.value,
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "alias",
+      label: "账户别名",
+      required: true,
+      itemWidth: 50,
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "openingBank",
+      label: "开户银行",
+      required: true,
+      itemWidth: 50,
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "账户名",
+      required: true,
+      itemWidth: 50,
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "accountOpening",
+      label: "账号",
+      required: true,
+      itemWidth: 50,
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "interbankNumber",
+      label: "联行号",
+      required: true,
+      itemWidth: 50,
+      itemType: "text",
+    },
+    // {
+    //   type: "title1",
+    //   title: "外汇信息",
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryName",
+    //   label: "Beneficiary Name",
+    //   required: true,
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryBank",
+    //   label: "Beneficiary Bank",
+    //   required: true,
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryBankAddress",
+    //   label: "Beneficiary Bank Address",
+    //   required: true,
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryAccountNumber",
+    //   label: "Beneficiary Account Number",
+    //   required: true,
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "swiftCode",
+    //   label: "Swift Code",
+    //   required: true,
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "input",
+    //   prop: "beneficiaryAddress",
+    //   label: "Beneficiary Address",
+    //   required: true,
+    //   itemType: "text",
+    //   itemWidth: 50,
+    // },
+    // {
+    //   type: "title1",
+    //   title: "账户余额",
+    // },
+    // {
+    //   type: "slot",
+    //   slotName: "balance",
+    //   label: "账户余额",
+    // },
+  ];
+});
+const rules = ref({
+  alias: [{ required: true, message: "请输入账户别名", trigger: "blur" }],
+  openingBank: [{ required: true, message: "请输入开户银行", trigger: "blur" }],
+  name: [{ required: true, message: "请输入账户名", trigger: "blur" }],
+  accountOpening: [{ required: true, message: "请输入账号", trigger: "blur" }],
+  currency: [{ required: true, message: "请选择币种", trigger: "change" }],
+  remainder: [{ required: true, message: "请输入账户余额", trigger: "blur" }],
+  corporationId: [
+    { required: true, message: "请选择业务公司", trigger: "change" },
+  ],
+  type: [{ required: true, message: "请选择类型", trigger: "change" }],
+});
+const formData = reactive({
+  data: {
+    accountRemainderList: [{ currency: "", remainder: undefined }],
+  },
+});
+const openModal = (val) => {
+  // modalType.value = val;
+  // formData.data = {
+  //   accountRemainderList: [{ currency: "", remainder: undefined }],
+  // };
+  // loadingDialog.value = false;
+  // dialogVisible.value = true;
+  let flowKey = "cost_control_flow";
+  proxy.$router.replace({
+    path: "/platform_manage/process/processApproval",
+    query: {
+      flowKey: flowKey,
+      flowName: "费控流程",
+      random: proxy.random(),
+    },
+  });
+};
+const clickBalance = () => {
+  if (
+    formData.data.accountRemainderList &&
+    formData.data.accountRemainderList.length > 0
+  ) {
+    formData.data.accountRemainderList.push({
+      currency: "",
+      remainder: undefined,
+    });
+  } else {
+    formData.data.accountRemainderList = [
+      { currency: "", remainder: undefined },
+    ];
+  }
+};
+const handleRemove = (index) => {
+  formData.data.accountRemainderList.splice(index, 1);
+};
+const isRepeat = (arr) => {
+  var hash = {};
+  for (var i in arr) {
+    if (hash[arr[i].currency]) return true;
+    hash[arr[i].currency] = true;
+  }
+  return false;
+};
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    loadingDialog.value = true;
+    proxy.post("/accountManagement/" + modalType.value, formData.data).then(
+      () => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        dialogVisible.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+    // if (
+    //   formData.data.accountRemainderList &&
+    //   formData.data.accountRemainderList.length > 0
+    // ) {
+    //   if (isRepeat(formData.data.accountRemainderList)) {
+    //     return ElMessage("请勿重复添加货币余额");
+    //   } else {
+    //     loadingDialog.value = true;
+    //     proxy.post("/accountManagement/" + modalType.value, formData.data).then(
+    //       () => {
+    //         ElMessage({
+    //           message: modalType.value == "add" ? "添加成功" : "编辑成功",
+    //           type: "success",
+    //         });
+    //         dialogVisible.value = false;
+    //         getList();
+    //       },
+    //       (err) => {
+    //         console.log(err);
+    //         loadingDialog.value = false;
+    //       }
+    //     );
+    //   }
+    // } else {
+    //   return ElMessage("请添加至少一条账户余额");
+    // }
+  });
+};
+const update = (row) => {
+  modalType.value = "edit";
+  loadingDialog.value = true;
+  proxy.post("/accountManagement/detail", { id: row.id }).then((res) => {
+    res.accountRemainderList = res.accountRemainderList.map((item) => {
+      return {
+        id: item.id,
+        currency: item.currency,
+        remainder: item.remainder,
+      };
+    });
+    formData.data = res;
+    loadingDialog.value = false;
+  });
+  dialogVisible.value = true;
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 335 - 0
src/views/finance/fundManage/kdCompany/index.vue

@@ -0,0 +1,335 @@
+<template>
+  <div class="pageIndexClass">
+    <div class="content">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :action-list="[
+          {
+            text: '添加',
+            action: () => openModal('add'),
+          },
+        ]" @get-list="getList">
+      </byTable>
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="60%">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="default">确 定</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import useUserStore from "@/store/modules/user";
+import { ElMessage, ElMessageBox } from "element-plus";
+
+const { proxy } = getCurrentInstance();
+const accountCurrency = ref([]);
+const typeData = ref([
+  {
+    label: "收入",
+    value: "10",
+  },
+  {
+    label: "支出",
+    value: "20",
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+  },
+});
+const loading = ref(false);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "公司名称",
+        prop: "name",
+      },
+    },
+
+    {
+      attrs: {
+        label: "税点",
+        prop: "taxPoints",
+      },
+    },
+    {
+      attrs: {
+        label: "开户行",
+        prop: "accountBank",
+      },
+    },
+    {
+      attrs: {
+        label: "开户名",
+        prop: "accountName",
+      },
+    },
+    {
+      attrs: {
+        label: "账号",
+        prop: "accountNumber",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              update(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              proxy
+                .msgConfirm()
+                .then((res) => {
+                  proxy
+                    .post("/logisticsCompanyInfo/delete", {
+                      id: row.id,
+                    })
+                    .then((res) => {
+                      proxy.msgTip("操作成功", 1);
+                      getList();
+                    });
+                })
+                .catch((err) => {});
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const corporationList = ref([]);
+const getDict = () => {
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "account_currency",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        accountCurrency.value = res.rows;
+      }
+    });
+  proxy
+    .post("/corporation/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      corporationList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.name,
+          value: item.id,
+        };
+      });
+    });
+};
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/logisticsCompanyInfo/page", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+getDict();
+getList();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "公司名称",
+      required: true,
+      itemWidth: 50,
+      itemType: "text",
+    },
+    {
+      type: "number",
+      prop: "taxPoints",
+      label: "税点",
+      precision: 2,
+      min: 0,
+      max: 100,
+      controls: false,
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "accountBank",
+      label: "开户行",
+      itemWidth: 50,
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "accountName",
+      label: "开户名",
+      itemWidth: 50,
+      itemType: "text",
+    },
+    {
+      type: "input",
+      prop: "accountNumber",
+      label: "账号",
+      itemWidth: 50,
+      itemType: "text",
+    },
+  ];
+});
+const rules = ref({
+  name: [{ required: true, message: "请输入公司名称", trigger: "blur" }],
+  taxPoints: [{ required: true, message: "请输入税点", trigger: "blur" }],
+  accountBank: [{ required: true, message: "请输入开户行", trigger: "blur" }],
+  accountName: [{ required: true, message: "请输入开户名", trigger: "blur" }],
+  accountNumber: [{ required: true, message: "请输入账号", trigger: "blur" }],
+});
+const formData = reactive({
+  data: {
+    accountRemainderList: [{ currency: "", remainder: undefined }],
+  },
+});
+const openModal = (val) => {
+  modalType.value = val;
+  formData.data = {
+    accountRemainderList: [{ currency: "", remainder: undefined }],
+  };
+  loadingDialog.value = false;
+  dialogVisible.value = true;
+};
+const clickBalance = () => {
+  if (
+    formData.data.accountRemainderList &&
+    formData.data.accountRemainderList.length > 0
+  ) {
+    formData.data.accountRemainderList.push({
+      currency: "",
+      remainder: undefined,
+    });
+  } else {
+    formData.data.accountRemainderList = [
+      { currency: "", remainder: undefined },
+    ];
+  }
+};
+const handleRemove = (index) => {
+  formData.data.accountRemainderList.splice(index, 1);
+};
+const isRepeat = (arr) => {
+  var hash = {};
+  for (var i in arr) {
+    if (hash[arr[i].currency]) return true;
+    hash[arr[i].currency] = true;
+  }
+  return false;
+};
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    loadingDialog.value = true;
+    proxy.post("/logisticsCompanyInfo/" + modalType.value, formData.data).then(
+      () => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+    // if (
+    //   formData.data.accountRemainderList &&
+    //   formData.data.accountRemainderList.length > 0
+    // ) {
+    //   if (isRepeat(formData.data.accountRemainderList)) {
+    //     return ElMessage("请勿重复添加货币余额");
+    //   } else {
+    //     loadingDialog.value = true;
+    //     proxy.post("/accountManagement/" + modalType.value, formData.data).then(
+    //       () => {
+    //         ElMessage({
+    //           message: modalType.value == "add" ? "添加成功" : "编辑成功",
+    //           type: "success",
+    //         });
+    //         dialogVisible.value = false;
+    //         getList();
+    //       },
+    //       (err) => {
+    //         console.log(err);
+    //         loadingDialog.value = false;
+    //       }
+    //     );
+    //   }
+    // } else {
+    //   return ElMessage("请添加至少一条类型余额");
+    // }
+  });
+};
+const update = (row) => {
+  loadingDialog.value = false;
+  modalType.value = "edit";
+  formData.data = proxy.deepClone(row);
+  dialogVisible.value = true;
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 304 - 0
src/views/finance/fundManage/paymentType/index.vue

@@ -0,0 +1,304 @@
+<template>
+  <div class="pageIndexClass">
+    <div class="content">
+      <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row :action-list="[
+          {
+            text: '添加',
+            action: () => openModal('add'),
+          },
+        ]" @get-list="getList">
+      </byTable>
+    </div>
+
+    <el-dialog :title="modalType == 'add' ? '添加' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="60%">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
+
+      </byForm>
+      <template #footer>
+        <el-button @click="dialogVisible = false" size="default">取 消</el-button>
+        <el-button type="primary" @click="submitForm()" size="default">确 定</el-button>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script setup>
+import { computed, ref } from "vue";
+import byTable from "@/components/byTable/index";
+import byForm from "@/components/byForm/index";
+import useUserStore from "@/store/modules/user";
+import { ElMessage, ElMessageBox } from "element-plus";
+
+const { proxy } = getCurrentInstance();
+const accountCurrency = ref([]);
+const typeData = ref([
+  {
+    label: "收入",
+    value: "10",
+  },
+  {
+    label: "支出",
+    value: "20",
+  },
+]);
+const sourceList = ref({
+  data: [],
+  pagination: {
+    total: 0,
+    pageNum: 1,
+    pageSize: 10,
+    keyword: "",
+  },
+});
+const loading = ref(false);
+const config = computed(() => {
+  return [
+    {
+      attrs: {
+        label: "名称",
+        prop: "name",
+      },
+    },
+    {
+      attrs: {
+        label: "收支类型",
+        prop: "tradeType",
+      },
+      render(val) {
+        return proxy.dictValueLabel(val, typeData.value);
+      },
+    },
+    {
+      attrs: {
+        label: "备注",
+        prop: "remark",
+      },
+    },
+    {
+      attrs: {
+        label: "排序",
+        prop: "sort",
+      },
+    },
+    {
+      attrs: {
+        label: "操作",
+        width: "120",
+        align: "center",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "修改",
+              type: "primary",
+              text: true,
+            },
+            el: "button",
+            click() {
+              update(row);
+            },
+          },
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              proxy
+                .msgConfirm()
+                .then((res) => {
+                  proxy
+                    .post("/paymentType/delete", {
+                      id: row.id,
+                    })
+                    .then((res) => {
+                      proxy.msgTip("操作成功", 1);
+                      getList();
+                    });
+                })
+                .catch((err) => {});
+            },
+          },
+        ];
+      },
+    },
+  ];
+});
+const corporationList = ref([]);
+const getDict = () => {
+  proxy
+    .post("/dictTenantData/page", {
+      pageNum: 1,
+      pageSize: 999,
+      dictCode: "account_currency",
+      tenantId: useUserStore().user.tenantId,
+    })
+    .then((res) => {
+      if (res.rows && res.rows.length > 0) {
+        accountCurrency.value = res.rows;
+      }
+    });
+  proxy
+    .post("/corporation/page", { pageNum: 1, pageSize: 9999 })
+    .then((res) => {
+      corporationList.value = res.rows.map((item) => {
+        return {
+          ...item,
+          label: item.name,
+          value: item.id,
+        };
+      });
+    });
+};
+const getList = async (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  loading.value = true;
+  proxy
+    .post("/accountManagement/page", sourceList.value.pagination)
+    .then((res) => {
+      sourceList.value.data = res.rows;
+      sourceList.value.pagination.total = res.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
+};
+getDict();
+getList();
+const modalType = ref("add");
+const dialogVisible = ref(false);
+const loadingDialog = ref(false);
+const submit = ref(null);
+const formOption = reactive({
+  inline: true,
+  labelWidth: 100,
+  itemWidth: 100,
+  rules: [],
+});
+const formConfig = computed(() => {
+  return [
+    {
+      type: "title1",
+      title: "基本信息",
+    },
+    {
+      type: "input",
+      prop: "name",
+      label: "名称",
+      required: true,
+      itemWidth: 50,
+      itemType: "text",
+    },
+    {
+      type: "select",
+      prop: "tradeType",
+      label: "收支类型",
+      data: typeData.value,
+      itemWidth: 50,
+    },
+    {
+      type: "input",
+      prop: "remark",
+      label: "备注",
+      itemWidth: 100,
+      itemType: "textarea",
+    },
+    {
+      type: "number",
+      prop: "sort",
+      label: "排序",
+      precision: 0,
+      min: 0,
+      controls: false,
+      // itemWidth: 25,
+    },
+  ];
+});
+const rules = ref({
+  name: [{ required: true, message: "请输入名称", trigger: "blur" }],
+  tradeType: [{ required: true, message: "请选择收支类型", trigger: "change" }],
+  sort: [{ required: true, message: "请输入排序", trigger: "blur" }],
+});
+
+const formData = reactive({
+  data: {},
+});
+const openModal = (val) => {
+  modalType.value = val;
+  formData.data = {
+    accountRemainderList: [{ currency: "", remainder: undefined }],
+  };
+  loadingDialog.value = false;
+  dialogVisible.value = true;
+};
+const clickBalance = () => {
+  if (
+    formData.data.accountRemainderList &&
+    formData.data.accountRemainderList.length > 0
+  ) {
+    formData.data.accountRemainderList.push({
+      currency: "",
+      remainder: undefined,
+    });
+  } else {
+    formData.data.accountRemainderList = [
+      { currency: "", remainder: undefined },
+    ];
+  }
+};
+const handleRemove = (index) => {
+  formData.data.accountRemainderList.splice(index, 1);
+};
+const isRepeat = (arr) => {
+  var hash = {};
+  for (var i in arr) {
+    if (hash[arr[i].currency]) return true;
+    hash[arr[i].currency] = true;
+  }
+  return false;
+};
+const submitForm = () => {
+  submit.value.handleSubmit(() => {
+    loadingDialog.value = true;
+    proxy.post("/paymentType/" + modalType.value, formData.data).then(
+      () => {
+        proxy.msgTip("操作成功", 1);
+        dialogVisible.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+        loadingDialog.value = false;
+      }
+    );
+  });
+};
+const update = (row) => {
+  modalType.value = "edit";
+  loadingDialog.value = true;
+  proxy.post("/accountManagement/detail", { id: row.id }).then((res) => {
+    res.accountRemainderList = res.accountRemainderList.map((item) => {
+      return {
+        id: item.id,
+        currency: item.currency,
+        remainder: item.remainder,
+      };
+    });
+    formData.data = res;
+    loadingDialog.value = false;
+  });
+  dialogVisible.value = true;
+};
+</script>
+
+<style lang="scss" scoped>
+.tenant {
+  padding: 20px;
+}
+::v-deep(.el-input-number .el-input__inner) {
+  text-align: left;
+}
+</style>

+ 5 - 0
src/views/process/processApproval/index.vue

@@ -20,6 +20,10 @@
           <SalesOutBound ref="makeDom" :queryData="queryData.data"></SalesOutBound>
         </template>
 
+        <template v-if="flowForm.flowKey == 'cost_control_flow'">
+          <CostControl ref="makeDom" :queryData="queryData.data"></CostControl>
+        </template>
+
         <!-- 销售订单 -->
         <Contract ref="makeDom" :queryData="queryData.data" v-else-if="flowForm.flowKey == 'contract_flow' || flowForm.flowKey == 'sample_flow'">
         </Contract>
@@ -194,6 +198,7 @@ import { useRouter, useRoute } from "vue-router";
 import PriceSheet from "@/components/process/SF/PriceSheet";
 import DiscussPrice from "@/components/process/SF/DiscussPrice";
 import SalesOutBound from "@/components/process/SF/SalesOutBound";
+import CostControl from "@/components/process/SF/CostControl";
 
 import Contract from "@/components/process/SF/Contract";
 import ContractChange from "@/components/process/SF/ContractChange";