ccjgmwz 4 gadi atpakaļ
vecāks
revīzija
9adfc8e6ac

+ 256 - 127
unimall-admin/src/views/company/company.vue

@@ -10,9 +10,33 @@
         style="width: 200px;"
         placeholder="请输入公司名"
       />
-      <el-button v-permission="['company:company:list']" class="filter-item" type="primary" size="mini" icon="el-icon-search" @click="handleFilter">查找</el-button>
-      <el-button v-permission="['company:company:create']" class="filter-item" type="primary" size="mini" icon="el-icon-edit" @click="handleCreate">添加</el-button>
-      <el-button v-permission="['company:company:updateBondAll']" class="filter-item" type="primary" size="mini" icon="el-icon-edit" @click="handleupdateBond">修改默认保证金</el-button>
+      <el-button
+        v-permission="['company:company:list']"
+        class="filter-item"
+        type="primary"
+        size="mini"
+        icon="el-icon-search"
+        @click="handleFilter"
+      >查找</el-button
+      >
+      <el-button
+        v-permission="['company:company:create']"
+        class="filter-item"
+        type="primary"
+        size="mini"
+        icon="el-icon-edit"
+        @click="handleCreate"
+      >添加</el-button
+      >
+      <el-button
+        v-permission="['company:company:updateBondAll']"
+        class="filter-item"
+        type="primary"
+        size="mini"
+        icon="el-icon-edit"
+        @click="handleupdateBond"
+      >修改默认定金</el-button
+      >
     </div>
 
     <!-- 查询结果 -->
@@ -27,30 +51,78 @@
     >
       <el-table-column align="center" label="公司名" prop="companyName" />
       <el-table-column align="center" label="公司地址" prop="companyPlace" />
-      <el-table-column align="center" label="公司电话" prop="companyPhone" width="150px"/>
+      <el-table-column
+        align="center"
+        label="公司电话"
+        prop="companyPhone"
+        width="150px"
+      />
       <el-table-column align="center" label="税号" prop="identificationNo" />
       <el-table-column align="center" label="银行账户" prop="companyBank" />
       <el-table-column align="center" label="银行卡号" prop="accountNo" />
-      <el-table-column align="center" label="总保证金" prop="bond" />
-      <el-table-column align="center" label="冻结保证金" prop="usedDeposit" />
-      <el-table-column align="center" label="创建时间" prop="gmtCreate" width="150px">
-        <template slot-scope="scope">{{ scope.row.gmtCreate | formatTime }}</template>
+      <el-table-column align="center" label="总定金" prop="bond" />
+      <el-table-column align="center" label="冻结定金" prop="usedDeposit" />
+      <el-table-column
+        align="center"
+        label="创建时间"
+        prop="gmtCreate"
+        width="150px"
+      >
+        <template slot-scope="scope">{{
+          scope.row.gmtCreate | formatTime
+        }}</template>
       </el-table-column>
-      <el-table-column align="center" label="更新时间" prop="gmtUpdate" width="150px">
-        <template slot-scope="scope">{{ scope.row.gmtUpdate | formatTime }}</template>
+      <el-table-column
+        align="center"
+        label="更新时间"
+        prop="gmtUpdate"
+        width="150px"
+      >
+        <template slot-scope="scope">{{
+          scope.row.gmtUpdate | formatTime
+        }}</template>
       </el-table-column>
-      <el-table-column width="400" align="center" label="操作" class-name="small-padding fixed-width">
+      <el-table-column
+        width="400"
+        align="center"
+        label="操作"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
-          <el-button v-permission="['company:company:edit']" type="primary" size="small" @click="handleUpdate(scope.row)">编辑</el-button>
-          <el-button v-permission="['company:company:returnBond']" type="primary" size="small" @click="handleback(scope.row)">退回保证金</el-button>
-          <el-button v-permission="['company:company:addBond']" type="primary" size="small" @click="handleadd(scope.row)">新增保证金</el-button>
-          <el-button v-permission="['company:company:delete']" type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
+          <el-button
+            v-permission="['company:company:edit']"
+            type="primary"
+            size="small"
+            @click="handleUpdate(scope.row)"
+          >编辑</el-button
+          >
+          <el-button
+            v-permission="['company:company:returnBond']"
+            type="primary"
+            size="small"
+            @click="handleback(scope.row)"
+          >退回定金</el-button
+          >
+          <el-button
+            v-permission="['company:company:addBond']"
+            type="primary"
+            size="small"
+            @click="handleadd(scope.row)"
+          >新增定金</el-button
+          >
+          <el-button
+            v-permission="['company:company:delete']"
+            type="danger"
+            size="small"
+            @click="handleDelete(scope.row)"
+          >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="listQuery.page"
       :limit.sync="listQuery.limit"
@@ -58,7 +130,11 @@
     />
 
     <!-- 添加或修改对话框 -->
-    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
+    <el-dialog
+      :title="textMap[dialogStatus]"
+      :visible.sync="dialogFormVisible"
+      :close-on-click-modal="false"
+    >
       <el-form
         ref="dataForm"
         :rules="rules"
@@ -89,20 +165,30 @@
         <el-form-item label="银行卡号" prop="accountNo">
           <el-input v-model="dataForm.accountNo" />
         </el-form-item>
-        <el-form-item label="保证金比例" prop="marginLevel">
+        <el-form-item label="金比例" prop="marginLevel">
           <el-input v-model="dataForm.marginLevel" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="dialogFormVisible = false">取消</el-button>
-        <el-button v-if="dialogStatus=='create'" :loading="submiting" type="primary" @click="createData">确定</el-button>
-        <el-button v-else :loading="submiting" type="primary" @click="updateData">确定</el-button>
+        <el-button
+          v-if="dialogStatus == 'create'"
+          :loading="submiting"
+          type="primary"
+          @click="createData"
+        >确定</el-button
+        >
+        <el-button
+          v-else
+          :loading="submiting"
+          type="primary"
+          @click="updateData"
+        >确定</el-button
+        >
       </div>
     </el-dialog>
     <!-- 退回定金对话框 -->
-    <el-dialog
-      :visible.sync="modifyVisible"
-      title="退回保证金">
+    <el-dialog :visible.sync="modifyVisible" title="退回定金">
       <el-form
         ref="modifyForm"
         :rules="rules"
@@ -112,22 +198,29 @@
         label-width="100px"
         style="width: 600px; margin-left:150px;"
       >
-        <el-form-item style="margin-top:30px" label="可退保证金" prop="dynamic" >
-          <el-input v-model="usedDeposit" :readonly="true" placeholder="请输入定金" />
+        <el-form-item style="margin-top:30px" label="可退定金" prop="dynamic">
+          <el-input
+            v-model="usedDeposit"
+            :readonly="true"
+            placeholder="请输入定金"
+          />
         </el-form-item>
-        <el-form-item style="margin-top:30px" label="退回金额" prop="dynamic" >
-          <el-input v-model="modifyForm.bond" placeholder="请输入退回金额"/>
+        <el-form-item style="margin-top:30px" label="退回金额" prop="dynamic">
+          <el-input v-model="modifyForm.bond" placeholder="请输入退回金额" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="modifyVisible = false">取消</el-button>
-        <el-button :loading="submiting" type="primary" @click="modifyData">确定</el-button>
+        <el-button
+          :loading="submiting"
+          type="primary"
+          @click="modifyData"
+        >确定</el-button
+        >
       </div>
     </el-dialog>
     <!-- 新增定金对话框 -->
-    <el-dialog
-      :visible.sync="addVisible"
-      title="新增保证金">
+    <el-dialog :visible.sync="addVisible" title="新增定金">
       <el-form
         ref="addForm"
         :rules="rules"
@@ -137,19 +230,22 @@
         label-width="100px"
         style="width: 600px; margin-left:150px;"
       >
-        <el-form-item style="margin-top:30px" label="新增金额" prop="dynamic" >
-          <el-input v-model="addForm.bond" placeholder="请输入新增金额"/>
+        <el-form-item style="margin-top:30px" label="新增金额" prop="dynamic">
+          <el-input v-model="addForm.bond" placeholder="请输入新增金额" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="addVisible = false">取消</el-button>
-        <el-button :loading="submiting" type="primary" @click="addData">确定</el-button>
+        <el-button
+          :loading="submiting"
+          type="primary"
+          @click="addData"
+        >确定</el-button
+        >
       </div>
     </el-dialog>
-    <!-- 修改默认保证金对话框 -->
-    <el-dialog
-      :visible.sync="editVisible"
-      title="修改默认保证金">
+    <!-- 修改默认定金对话框 -->
+    <el-dialog :visible.sync="editVisible" title="修改默认定金">
       <el-form
         ref="editForm"
         :rules="rules"
@@ -159,13 +255,21 @@
         label-width="100px"
         style="width: 600px; margin-left:150px;"
       >
-        <el-form-item style="margin-top:30px" label="默认保证金" prop="dynamic" >
-          <el-input v-model="editForm.marginLevel" placeholder="请输入默认保证金"/>
+        <el-form-item style="margin-top:30px" label="默认定金" prop="dynamic">
+          <el-input
+            v-model="editForm.marginLevel"
+            placeholder="请输入默认定金"
+          />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="editVisible = false">取消</el-button>
-        <el-button :loading="submiting" type="primary" @click="updateBondData">确定</el-button>
+        <el-button
+          :loading="submiting"
+          type="primary"
+          @click="updateBondData"
+        >确定</el-button
+        >
       </div>
     </el-dialog>
   </div>
@@ -218,12 +322,24 @@ export default {
       },
       usedDeposit: '',
       rules: {
-        companyName: [{ required: true, message: '公司名不能为空', trigger: 'blur' }],
-        companyPlace: [{ required: true, message: '公司地址不能为空', trigger: 'blur' }],
-        companyPhone: [{ required: true, message: '公司电话不能为空', trigger: 'blur' }],
-        identificationNo: [{ required: true, message: '税号不能为空', trigger: 'blur' }],
-        companyBank: [{ required: true, message: '银行账户不能为空', trigger: 'blur' }],
-        accountNo: [{ required: true, message: '银行卡号不能为空', trigger: 'blur' }]
+        companyName: [
+          { required: true, message: '公司名不能为空', trigger: 'blur' }
+        ],
+        companyPlace: [
+          { required: true, message: '公司地址不能为空', trigger: 'blur' }
+        ],
+        companyPhone: [
+          { required: true, message: '公司电话不能为空', trigger: 'blur' }
+        ],
+        identificationNo: [
+          { required: true, message: '税号不能为空', trigger: 'blur' }
+        ],
+        companyBank: [
+          { required: true, message: '银行账户不能为空', trigger: 'blur' }
+        ],
+        accountNo: [
+          { required: true, message: '银行卡号不能为空', trigger: 'blur' }
+        ]
       }
     }
   },
@@ -234,11 +350,12 @@ export default {
   methods: {
     getList() {
       this.listLoading = true
-      listCompany(this.listQuery).then(response => {
-        this.list = response.data.data.items
-        this.total = response.data.data.total
-        this.listLoading = false
-      })
+      listCompany(this.listQuery)
+        .then(response => {
+          this.list = response.data.data.items
+          this.total = response.data.data.total
+          this.listLoading = false
+        })
         .catch(() => {
           this.list = []
           this.total = 0
@@ -263,37 +380,38 @@ export default {
       })
     },
     handleback(row) {
-      this.modifyVisible=true
-      this.modifyForm.id=row.id
-      this.usedDeposit=Number(row.bond)-Number(row.usedDeposit)
+      this.modifyVisible = true
+      this.modifyForm.id = row.id
+      this.usedDeposit = Number(row.bond) - Number(row.usedDeposit)
     },
     handleadd(row) {
-      this.addVisible=true
-      this.addForm.id=row.id
+      this.addVisible = true
+      this.addForm.id = row.id
     },
     handleupdateBond(row) {
-      this.editVisible=true
-      this.editForm.id=row.id
+      this.editVisible = true
+      this.editForm.id = row.id
     },
     modifyData() {
-      if (Number(this.usedDeposit)-Number(this.modifyForm.bond)<0) {
+      if (Number(this.usedDeposit) - Number(this.modifyForm.bond) < 0) {
         this.$notify.error({
           title: '失败',
-          message: '退回保证金金额不能大于保证金金额'
+          message: '退回定金金额不能大于定金金额'
         })
       } else {
         this.$refs['modifyForm'].validate(valid => {
           if (valid) {
             this.submiting = true
-            returnBond(this.modifyForm).then(() => {
-              this.modifyVisible = false
-              this.submiting = false
-              this.$notify.success({
-                title: '成功',
-                message: '退回保证金成功'
+            returnBond(this.modifyForm)
+              .then(() => {
+                this.modifyVisible = false
+                this.submiting = false
+                this.$notify.success({
+                  title: '成功',
+                  message: '退回定金成功'
+                })
+                this.getList()
               })
-              this.getList()
-            })
               .catch(response => {
                 this.$notify.error({
                   title: '失败',
@@ -310,15 +428,16 @@ export default {
       this.$refs['addForm'].validate(valid => {
         if (valid) {
           this.submiting = true
-          addBond(this.addForm).then(() => {
-            this.addVisible = false
-            this.submiting = false
-            this.$notify.success({
-              title: '成功',
-              message: '新增保证金成功'
+          addBond(this.addForm)
+            .then(() => {
+              this.addVisible = false
+              this.submiting = false
+              this.$notify.success({
+                title: '成功',
+                message: '新增定金成功'
+              })
+              this.getList()
             })
-            this.getList()
-          })
             .catch(response => {
               this.$notify.error({
                 title: '失败',
@@ -333,15 +452,16 @@ export default {
       this.$refs['editForm'].validate(valid => {
         if (valid) {
           this.submiting = true
-          updateBondAll(this.editForm).then(() => {
-            this.editVisible = false
-            this.submiting = false
-            this.$notify.success({
-              title: '成功',
-              message: '修改保证金成功'
+          updateBondAll(this.editForm)
+            .then(() => {
+              this.editVisible = false
+              this.submiting = false
+              this.$notify.success({
+                title: '成功',
+                message: '修改定金成功'
+              })
+              this.getList()
             })
-            this.getList()
-          })
             .catch(response => {
               this.$notify.error({
                 title: '失败',
@@ -356,15 +476,16 @@ export default {
       this.$refs['dataForm'].validate(valid => {
         if (valid) {
           this.submiting = true
-          createCompany(this.dataForm).then(response => {
-            this.list.unshift(response.data.data)
-            this.dialogFormVisible = false
-            this.$notify.success({
-              title: '成功',
-              message: '添加成功'
+          createCompany(this.dataForm)
+            .then(response => {
+              this.list.unshift(response.data.data)
+              this.dialogFormVisible = false
+              this.$notify.success({
+                title: '成功',
+                message: '添加成功'
+              })
+              this.submiting = false
             })
-            this.submiting = false
-          })
             .catch(response => {
               this.$notify.error({
                 title: '失败',
@@ -387,21 +508,22 @@ export default {
       this.$refs['dataForm'].validate(valid => {
         if (valid) {
           this.submiting = true
-          updateCompany(this.dataForm).then(() => {
-            for (const v of this.list) {
-              if (v.id === this.dataForm.id) {
-                const index = this.list.indexOf(v)
-                this.list.splice(index, 1, this.dataForm)
-                break
+          updateCompany(this.dataForm)
+            .then(() => {
+              for (const v of this.list) {
+                if (v.id === this.dataForm.id) {
+                  const index = this.list.indexOf(v)
+                  this.list.splice(index, 1, this.dataForm)
+                  break
+                }
               }
-            }
-            this.dialogFormVisible = false
-            this.submiting = false
-            this.$notify.success({
-              title: '成功',
-              message: '更新成功'
+              this.dialogFormVisible = false
+              this.submiting = false
+              this.$notify.success({
+                title: '成功',
+                message: '更新成功'
+              })
             })
-          })
             .catch(response => {
               this.$notify.error({
                 title: '失败',
@@ -413,28 +535,35 @@ export default {
       })
     },
     handleDelete(row) {
-      this.$confirm('此操作将永久删除该记录---' + row.id + '---, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        deleteCompany(row.id).then(response => {
-          this.$notify.success({
-            title: '成功',
-            message: '删除成功'
-          })
-          const index = this.list.indexOf(row)
-          this.list.splice(index, 1)
-        })
-          .catch(response => {
-            this.$notify.error({
-              title: '失败',
-              message: response.data.errmsg
+      this.$confirm(
+        '此操作将永久删除该记录---' + row.id + '---, 是否继续?',
+        '提示',
+        {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }
+      )
+        .then(() => {
+          deleteCompany(row.id)
+            .then(response => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功'
+              })
+              const index = this.list.indexOf(row)
+              this.list.splice(index, 1)
             })
-          })
-      }).catch(() => {
-        return false
-      })
+            .catch(response => {
+              this.$notify.error({
+                title: '失败',
+                message: response.data.errmsg
+              })
+            })
+        })
+        .catch(() => {
+          return false
+        })
     }
   }
 }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 504 - 237
unimall-admin/src/views/trade/trade.vue


+ 1 - 1
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/task/TaskAppService.java

@@ -200,7 +200,7 @@ public interface TaskAppService {
             @NotNull @HttpParam(name = "grossWeight", type = HttpParamType.COMMON, description = "毛重") Float grossWeight,
             @NotNull @HttpParam(name = "skinWeight", type = HttpParamType.COMMON, description = "皮重") Float skinWeight,
             @NotNull @HttpParam(name = "netWeight", type = HttpParamType.COMMON, description = "净重") Float netWeight,
-            @NotNull @HttpParam(name = "poundImg", type = HttpParamType.COMMON, description = "磅单照片") String poundImg,
+            @HttpParam(name = "poundImg", type = HttpParamType.COMMON, description = "磅单照片") String poundImg,
             @NotNull @HttpParam(name = "warehouse", type = HttpParamType.COMMON, description = "仓位号") String warehouse,
             @HttpParam(name = "price", type = HttpParamType.COMMON, description = "出库费用") Float price,
             @NotNull @HttpParam(name = "protein", type = HttpParamType.COMMON, description = "蛋白") Float protein,

+ 13 - 0
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/task/TaskAppServiceImpl.java

@@ -1818,10 +1818,12 @@ public class TaskAppServiceImpl implements TaskAppService{
         taskDO.setMemo(memo);
         taskDO.setTitleNo(titleNo);
         if(taskMapper.updateById(taskDO) > 0){
+            String buyer="";
             // 更新库点货量
             List<TradeDO> tradeDOList = tradeMapper.selectList(new EntityWrapper<TradeDO>().eq("order_no", taskDO.getOrderNo()));
             if(!CollectionUtils.isEmpty(tradeDOList)){
                 TradeDO tradeDO = tradeDOList.get(0);
+                buyer = tradeDO.getBuyer();
                 SaleDO saleDO = saleMapper.selectById(tradeDO.getSalebuyId());
                 if (saleDO != null) {
                     StoreDO storeDO = storeMapper.selectById(saleDO.getStoreId());
@@ -1867,6 +1869,17 @@ public class TaskAppServiceImpl implements TaskAppService{
                 saleDO.setTotal(CalculationUtil.subToFloat(saleDO.getTotal(),netWeight));
                 saleMapper.updateById(saleDO);
             }
+            MessageDO messageDO = new MessageDO();
+            messageDO.setCustomer("客户["+buyer+"]的车辆[" + carNo +"]");
+            messageDO.setOperation("已经出库");
+            messageDO.setResult("点击查看详细信息");
+            messageDO.setGmtUpdate(now);
+            messageDO.setGmtCreate(now);
+            messageDO.setUserId(userId);
+            messageDO.setCompanyId(taskDO.getCompanyId());
+            messageDO.setPath("/report/tradeTotal");
+            messageMapper.insert(messageDO);
+            webSocket.sendMessageByRole(messageDO, "内勤", taskDO.getCompanyId());
         }
         else{
             throw new AppServiceException(ExceptionDefinition.APP_UNKNOWN_EXCEPTION);

+ 2 - 2
unimall-app-api/src/main/java/com/iotechn/unimall/app/api/trade/TradeAppServiceImpl.java

@@ -431,8 +431,8 @@ public class TradeAppServiceImpl implements TradeAppService {
                     taskMapper.updateById(taskDO);
                 }
                 MessageDO messageDO = new MessageDO();
-                messageDO.setCustomer("客户");
-                messageDO.setOperation(" 已确认"+buyReportDO.getCarNo()+"车辆卸货,");
+                messageDO.setCustomer("客户["+tradeDO.getSeller()+"]");
+                messageDO.setOperation(" 已确认["+buyReportDO.getCarNo()+"]车辆卸货,");
                 messageDO.setResult("请及时申请付款");
                 messageDO.setGmtUpdate(now);
                 messageDO.setGmtCreate(now);

+ 6 - 0
unimall-app/pageA/pages/deliver_goods.vue

@@ -40,6 +40,12 @@
 							 <image class='poundimg' :src="item.poundImg" mode="aspectFit"></image>
 						</view>
 					</view>
+					<view v-if="contractType =='采购合同'&&item.poundImg " class='flex justify-between'>
+						<view class="poundtital">发货磅单</view>
+							<view class="grid col-2 grid-square bg-img" v-if="item.poundImg != ''" @tap="ViewImage" :data-url="item.poundImg">
+							 <image class='poundimg' :src="item.poundImg" mode="aspectFit"></image>
+						</view>
+					</view>
 					<view v-if="item.taskStatus==4 && contractType =='销售合同'" class="padding flex flex-direction">
 						<button class="cu-btn bg-orange margin-tb-sm" @click="commit">确认卸货</button>
 					</view>

+ 2 - 2
unimall-app/pageA/pages/task_detail_ck.vue

@@ -222,7 +222,7 @@
 				waterContent:'',
                 warehouse:'',
 				warehouses:[],
-				outMode: ['散装', '大袋(50kg)', '小袋(25kg)'],
+				outMode: ['散装', '袋装'],
 				outModeIndex:0,
 				price:'',
 				address:'',
@@ -534,7 +534,7 @@
 					this.$api.msg('请填写皮重');
 					return;
 				}
-				if(!that.poundImg){
+				if(this.outMode[this.outModeIndex] == "散装" && !that.poundImg){
 					this.$api.msg('请上传磅单照片');
 					return;
 				}

+ 1 - 0
unimall-app/pages/user/task.vue

@@ -24,6 +24,7 @@
 							<view v-else>
 								<view style='font-weight: 600;font-size: 16px;margin-bottom: 5px;'>{{item.taskType}}<text v-if='item.carNo'>({{item.carNo}})</text></view>
 							</view>
+							<view style='color:#ccc;'>{{item.customer}}</view>
 							<view style='color:#ccc;'>{{item.gmtUpdate}}</view>
 						</view>
 					</view>

+ 6 - 2
unimall-data/src/main/resources/com/iotechn/unimall/data/mapper/TaskMapper.xml

@@ -145,7 +145,7 @@
                 '' AS storeName1,
                 '' AS unloadingFee,
                 b.buy,
-                '' as customer,
+                IFNULL(ucom.company_name,ucom.person_name) as customer,
                 '' as type,
                 '' as title,
                 '' as tradeCount,
@@ -165,6 +165,8 @@
             left join unimall_purchase p on p.purchase_no = s.send_car_no
             left join unimall_buy_report b on b.id=s.report_id
             left join sys_dict_data sys on sys.dict_type = 'car_status' and sys.value = c.status
+            left join unimall_trade tr on tr.order_no=s.order_no
+			left join unimall_company ucom on ucom.id = tr.trade_company_id
             WHERE 1=1
               and (s.task_type = '入库任务' or s.task_type = '出库任务' )
               and s.company_id =   #{companyId}
@@ -226,7 +228,7 @@
                 '' AS storeName1,
                 '' AS unloadingFee,
                 b.buy,
-                '' as customer,
+                IFNULL(ucom.company_name,ucom.person_name) as customer,
                 '' as type,
                 '' as title,
                 '' as tradeCount,
@@ -246,6 +248,8 @@
             left join unimall_purchase p on p.purchase_no = s.send_car_no
             left join unimall_buy_report b on b.id=s.report_id
             left join sys_dict_data sys on sys.dict_type = 'car_status' and sys.value = c.status
+            left join unimall_trade tr on tr.order_no=s.order_no
+			left join unimall_company ucom on ucom.id = tr.trade_company_id
             WHERE 1=1
               and s.user_id =  #{userId}
               and s.company_id = #{companyId}

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels