jg-waiwang-pro
vayne 6 months ago
commit 2c1310fdbd

@ -522,7 +522,7 @@
<select id="queryTransitInventory" resultType="java.math.BigDecimal"> <select id="queryTransitInventory" resultType="java.math.BigDecimal">
SELECT SELECT
SUM(c.business_num) businessNumSum IFNULL(SUM( c.business_num ),0) businessNumSum
FROM FROM
jg_business_order a jg_business_order a
LEFT JOIN flow_task b ON a.id = b.f_process_id LEFT JOIN flow_task b ON a.id = b.f_process_id
@ -546,6 +546,28 @@
AND (d.id IS NULL OR e.id IS NULL OR f.f_id IS NULL OR f.f_status = 1 OR f.f_status = 0) AND (d.id IS NULL OR e.id IS NULL OR f.f_id IS NULL OR f.f_status = 1 OR f.f_status = 0)
</select> </select>
<select id="queryOccupyInventory" resultType="java.math.BigDecimal">
SELECT
IFNULL(SUM( c.business_num ),0) businessNumSum
FROM
jg_business_order a
LEFT JOIN flow_task b ON a.id = b.f_process_id
LEFT JOIN jg_business_order_product_relational c ON a.id = c.business_order_id
WHERE
a.f_delete_mark IS NULL
AND a.business_type = 2 AND a.status IN (4,5)
AND b.f_status = 2
<if test="inventoryEntity.warehouseId != null and inventoryEntity.warehouseId != ''">
AND a.delivery_warehouse = #{inventoryEntity.warehouseId}
</if>
<if test="inventoryEntity.storageAreaId != null and inventoryEntity.storageAreaId != ''">
AND a.delivery_warehouse = #{inventoryEntity.storageAreaId}
</if>
<if test="inventoryEntity.productId != null and inventoryEntity.productId != ''">
AND c.product_id = #{inventoryEntity.productId}
</if>
</select>
<select id="queryProductByContract" resultMap="productByContract"> <select id="queryProductByContract" resultMap="productByContract">
SELECT SELECT
a.id, a.id,

@ -165,7 +165,7 @@
<select id="queryTransitInventory" resultType="java.math.BigDecimal"> <select id="queryTransitInventory" resultType="java.math.BigDecimal">
SELECT SELECT
SUM(c.sale_num) saleNumSum IFNULL(SUM(c.sale_num),0) saleNumSum
FROM FROM
jg_return_cargo_order a jg_return_cargo_order a
LEFT JOIN flow_task b ON a.id = b.f_process_id LEFT JOIN flow_task b ON a.id = b.f_process_id
@ -188,4 +188,27 @@
</if> </if>
AND (d.id IS NULL OR e.id IS NULL OR f.f_id IS NULL OR f.f_status = 1 OR f.f_status = 0) AND (d.id IS NULL OR e.id IS NULL OR f.f_id IS NULL OR f.f_status = 1 OR f.f_status = 0)
</select> </select>
<select id="queryOccupyInventory" resultType="java.math.BigDecimal">
SELECT
IFNULL(SUM(c.sale_num),0) saleNumSum
FROM
jg_return_cargo_order a
LEFT JOIN flow_task b ON a.id = b.f_process_id
LEFT JOIN jg_delivery_product_relation c ON a.id = c.order_id and c.business_type = 2 and c.f_delete_user_id is null
WHERE
a.f_delete_mark IS NULL
AND a.document_type = 1
AND b.f_status = 2 AND a.document_status in (3,4)
<if test="inventoryEntity.warehouseId != null and inventoryEntity.warehouseId != ''">
AND a.warehouse_id = #{inventoryEntity.warehouseId}
</if>
<if test="inventoryEntity.storageAreaId != null and inventoryEntity.storageAreaId != ''">
AND c.cargo_id = #{inventoryEntity.storageAreaId}
</if>
<if test="inventoryEntity.productId != null and inventoryEntity.productId != ''">
AND c.product_id = #{inventoryEntity.productId}
</if>
</select>
</mapper> </mapper>

@ -46,13 +46,13 @@
</resultMap> </resultMap>
<select id="queryTransitInventory" resultType="java.math.BigDecimal"> <select id="queryTransitInventory" resultType="java.math.BigDecimal">
SELECT SUM(d.usedreturn_number) usedreturnNumSum from jg_warehousing_receive a SELECT IFNULL(SUM( d.usedreturn_number),0) usedreturnNumSum from jg_warehousing_receive a
LEFT JOIN flow_task b ON a.id = b.f_process_id LEFT JOIN flow_task b ON a.id = b.f_process_id
LEFT JOIN jg_work_order c on a.business_id = c.id LEFT JOIN jg_work_order c on a.business_id = c.id
LEFT JOIN jg_warehousing_receive_product d on a.id = d.receive_id LEFT JOIN jg_warehousing_receive_product d on a.id = d.receive_id
WHERE WHERE
a.f_delete_mark IS NULL and c.f_delete_mark IS NULL a.f_delete_mark IS NULL and c.f_delete_mark IS NULL
AND b.f_status = 2 AND c.status in (2,3) AND b.f_status = 2 AND c.status in (2,3,4)
<if test="inventoryEntity.warehouseId != null and inventoryEntity.warehouseId != ''"> <if test="inventoryEntity.warehouseId != null and inventoryEntity.warehouseId != ''">
AND a.warehouse_id = #{inventoryEntity.warehouseId} AND a.warehouse_id = #{inventoryEntity.warehouseId}
</if> </if>
@ -64,6 +64,21 @@
</if> </if>
</select> </select>
<select id="queryOccupyInventory" resultType="java.math.BigDecimal">
SELECT IFNULL(SUM( c.reality_num),0) usedreturnNumSum FROM jg_work_order a LEFT JOIN flow_task b ON a.id = b.f_process_id
LEFT JOIN jg_work_order_primary c on a.id = c.work_id
WHERE a.f_delete_mark IS NULL AND b.f_status = 2 AND a.status in (2,3,4)
<if test="inventoryEntity.warehouseId != null and inventoryEntity.warehouseId != ''">
AND a.warehouse_id = #{inventoryEntity.warehouseId}
</if>
<if test="inventoryEntity.storageAreaId != null and inventoryEntity.storageAreaId != ''">
AND c.cargo_id = #{inventoryEntity.storageAreaId}
</if>
<if test="inventoryEntity.productId != null and inventoryEntity.productId != ''">
AND c.product_id = #{inventoryEntity.productId}
</if>
</select>
<select id="queryWorkOrderReceiveProduct" resultMap="receiveProduct"> <select id="queryWorkOrderReceiveProduct" resultMap="receiveProduct">
SELECT SELECT
b.*, b.*,

@ -0,0 +1,241 @@
package jnpf.util;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import jnpf.database.model.superQuery.SuperJsonModel;
import jnpf.database.model.superQuery.SuperQueryJsonModel;
import jnpf.emnus.SearchMethodEnum;
import jnpf.model.QueryModel;
import jnpf.model.visualJson.FieLdsModel;
import jnpf.model.visualJson.config.ConfigModel;
import jnpf.util.visiual.JnpfKeyConsts;
import lombok.Data;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Data
public class QueryUtil2 {
/**
*
*/
private SearchMethodEnum symbol;
/**
*
*/
private boolean and;
/**
*
*/
private String jnpfKey;
/**
* key
*/
private String vModel;
/**
*
*/
private Object fieldValue;
/**
* 2
*/
private Object fieldValueTwo;
/**
*
*/
private String dbType;
private List<String> dataList = new ArrayList<>();
//搜索逻辑
public <T> QueryWrapper<T> queryList(QueryModel queryModel) {
QueryWrapper<T> queryWrapper = queryModel.getObj();
Class entity = queryModel.getEntity();
dbType = queryModel.getDbType();
String queryJson = queryModel.getQueryJson();
List<SuperJsonModel> superJsonModelList = JsonUtil.getJsonToList(queryJson, SuperJsonModel.class);
for (SuperJsonModel superJsonModel : superJsonModelList) {
String matchLogic = superJsonModel.getMatchLogic();
Boolean authorizeLogic = superJsonModel.getAuthorizeLogic();
boolean isAddMatchLogic = SearchMethodEnum.And.getSymbol().equalsIgnoreCase(matchLogic);
List<SuperQueryJsonModel> conditionList = superJsonModel.getConditionList();
if (conditionList.size() == 0) continue;
queryWrapper.and(gw -> {
if (authorizeLogic) {
gw.and(tw -> {
queryWrapperList(entity, tw, conditionList, isAddMatchLogic);
});
} else {
gw.or(tw -> {
queryWrapperList(entity, tw, conditionList, isAddMatchLogic);
});
}
});
}
return queryWrapper;
}
private <T> void queryWrapperList(Class entity, QueryWrapper<T> tw, List<SuperQueryJsonModel> conditionList, boolean isAddMatchLogic) {
for (SuperQueryJsonModel superQueryJsonModel : conditionList) {
String logic = superQueryJsonModel.getLogic();
and = SearchMethodEnum.And.getSymbol().equalsIgnoreCase(logic);
List<FieLdsModel> queryList = superQueryJsonModel.getGroups();
queryWrapper(entity, tw, queryList, isAddMatchLogic);
}
}
private <T> void queryWrapper(Class entity, QueryWrapper<T> tw, List<FieLdsModel> queryListAll, boolean isAnd) {
if (isAnd) {
tw.and(qw -> {
query(entity, qw, queryListAll);
});
} else {
tw.or(qw -> {
query(entity, qw, queryListAll);
});
}
}
private <T> void query(Class entity, QueryWrapper<T> qw, List<FieLdsModel> queryListAll) {
for (FieLdsModel fieLdsModel : queryListAll) {
List<FieLdsModel> queryList = new ArrayList() {{
add(fieLdsModel);
}};
if (and) {
qw.and(ew -> {
fieldsModel(ew, queryList, entity);
});
} else {
qw.or(ew -> {
fieldsModel(ew, queryList, entity);
});
}
}
}
private void fieldsModel(QueryWrapper wrapper, List<FieLdsModel> queryList, Class entity) {
for (FieLdsModel fieLdsModel : queryList) {
ConfigModel config = fieLdsModel.getConfig();
jnpfKey = config.getJnpfKey();
symbol = SearchMethodEnum.getSearchMethod(fieLdsModel.getSymbol());
vModel = "a." + fieLdsModel.getVModel();
if (!and) {
wrapper.or();
}
try {
Field declaredField = entity.getDeclaredField(vModel);
declaredField.setAccessible(true);
vModel = declaredField.getAnnotation(TableField.class).value();
} catch (Exception e) {
}
fieldValue = fieLdsModel.getFieldValueOne();
fieldValueTwo = fieLdsModel.getFieldValueTwo();
dataList = fieLdsModel.getDataList();
if(JnpfKeyConsts.DateSelect.contains(fieLdsModel.getConfig().getJnpfKey())){
if(ObjectUtils.isNotEmpty(fieLdsModel.getFieldValueOne())){
fieldValue = new Date(Long.valueOf(fieLdsModel.getFieldValueOne().toString()));
}
if(ObjectUtils.isNotEmpty(fieLdsModel.getFieldValueTwo())){
fieldValueTwo = new Date(Long.valueOf(fieLdsModel.getFieldValueTwo().toString()));
}
}
getSymbolWrapper(wrapper);
}
}
private void getNullWrapper(QueryWrapper<?> wrapper) {
if (!and) {
wrapper.or(t -> t.isNull(vModel));
} else {
wrapper.and(t -> t.isNull(vModel));
}
}
private void getNotNullWrapper(QueryWrapper<?> wrapper) {
if (!and) {
wrapper.or(t -> t.isNotNull(vModel));
} else {
wrapper.and(t -> t.isNotNull(vModel));
}
}
private void getInWrapper(QueryWrapper<?> wrapper) {
if (!and) {
wrapper.or(qw -> {
for (String id : dataList) {
switch (symbol) {
case Included:
qw.or().like(vModel, id);
break;
default:
qw.notLike(vModel, id);
break;
}
}
});
} else {
wrapper.and(qw -> {
for (String id : dataList) {
switch (symbol) {
case Included:
qw.or().like(vModel, id);
break;
default:
qw.notLike(vModel, id);
break;
}
}
});
}
}
private void getSymbolWrapper(QueryWrapper<?> wrapper) {
switch (symbol) {
case IsNull:
getNullWrapper(wrapper);
break;
case IsNotNull:
getNotNullWrapper(wrapper);
break;
case Equal:
wrapper.eq(vModel, fieldValue);
break;
case NotEqual:
wrapper.ne(vModel, fieldValue);
break;
case GreaterThan:
wrapper.gt(vModel, fieldValue);
break;
case LessThan:
wrapper.lt(vModel, fieldValue);
break;
case GreaterThanOrEqual:
wrapper.ge(vModel, fieldValue);
break;
case LessThanOrEqual:
wrapper.le(vModel, fieldValue);
break;
case Like:
wrapper.like(vModel, fieldValue);
break;
case NotLike:
wrapper.notLike(vModel, fieldValue);
break;
case Included:
case NotIncluded:
getInWrapper(wrapper);
break;
case Between:
wrapper.between(vModel, fieldValue, fieldValueTwo);
break;
default:
break;
}
}
}

@ -47,4 +47,6 @@ public interface BusinessOrderMapper extends BaseMapper<BusinessOrderEntity> {
List<ProductWarehouseEntity> orderByVoucher(@Param("voucherIds") List<String> voucherIds); List<ProductWarehouseEntity> orderByVoucher(@Param("voucherIds") List<String> voucherIds);
List<BusinessOrderEntity> purchaseOrderByReceiptOrder(@Param("ew") QueryWrapper<BusinessOrderEntity> queryWrapper); List<BusinessOrderEntity> purchaseOrderByReceiptOrder(@Param("ew") QueryWrapper<BusinessOrderEntity> queryWrapper);
BigDecimal queryOccupyInventory(@Param("inventoryEntity") InventoryEntity entity);
} }

@ -24,4 +24,6 @@ public interface ReturnCargoOrderMapper extends BaseMapper<ReturnCargoOrderEntit
IPage<ReturnCargoOrderEntity> queryReturnCargoOrderList(@Param("page")Page<ReturnCargoOrderEntity> page, @Param("returnCargoOrderPagination")ReturnCargoOrderPagination returnCargoOrderPagination, @Param("ew")QueryWrapper<ReturnCargoOrderEntity> returnCargoOrderEntityQueryWrapper); IPage<ReturnCargoOrderEntity> queryReturnCargoOrderList(@Param("page")Page<ReturnCargoOrderEntity> page, @Param("returnCargoOrderPagination")ReturnCargoOrderPagination returnCargoOrderPagination, @Param("ew")QueryWrapper<ReturnCargoOrderEntity> returnCargoOrderEntityQueryWrapper);
BigDecimal queryTransitInventory(@Param("inventoryEntity") InventoryEntity inventoryEntity); BigDecimal queryTransitInventory(@Param("inventoryEntity") InventoryEntity inventoryEntity);
BigDecimal queryOccupyInventory(@Param("inventoryEntity") InventoryEntity entity);
} }

@ -26,4 +26,6 @@ public interface WarehousingReceiveMapper extends BaseMapper<WarehousingReceiveE
//返库单根据加工单带出加工原材料 //返库单根据加工单带出加工原材料
List<ProductWarehouseEntity> queryWorkOrderReceiveProduct(@Param("id") String id); List<ProductWarehouseEntity> queryWorkOrderReceiveProduct(@Param("id") String id);
BigDecimal queryOccupyInventory(@Param("inventoryEntity") InventoryEntity entity);
} }

@ -70,4 +70,6 @@ public interface BusinessOrderService extends IService<BusinessOrderEntity> {
//采购收货单中的采购订单列表 //采购收货单中的采购订单列表
List<BusinessOrderEntity> purchaseOrderByReceiptOrderInfo(QueryWrapper<BusinessOrderEntity> queryWrapper); List<BusinessOrderEntity> purchaseOrderByReceiptOrderInfo(QueryWrapper<BusinessOrderEntity> queryWrapper);
BigDecimal queryOccupyInventory(InventoryEntity entity);
} }

@ -43,4 +43,6 @@ public interface ReturnCargoOrderService extends IService<ReturnCargoOrderEntity
void saveOrUpdate(ReturnCargoOrderForm returnCargoOrderForm,String id, boolean isSave) throws Exception; void saveOrUpdate(ReturnCargoOrderForm returnCargoOrderForm,String id, boolean isSave) throws Exception;
BigDecimal queryTransitInventory(InventoryEntity entity); BigDecimal queryTransitInventory(InventoryEntity entity);
BigDecimal queryOccupyInventory(InventoryEntity entity);
} }

@ -46,4 +46,6 @@ public interface WarehousingReceiveService extends IService<WarehousingReceiveEn
void saveOrUpdateWorkOrder(WarehousingReceiveForm warehousingReceiveForm,String id, boolean isSave) throws Exception; void saveOrUpdateWorkOrder(WarehousingReceiveForm warehousingReceiveForm,String id, boolean isSave) throws Exception;
List<ProductWarehouseEntity> getWorkProduct(String id); List<ProductWarehouseEntity> getWorkProduct(String id);
BigDecimal queryOccupyInventory(InventoryEntity entity);
} }

@ -49,7 +49,7 @@ import javax.annotation.Resource;
@Service @Service
public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, BusinessOrderEntity> implements BusinessOrderService{ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, BusinessOrderEntity> implements BusinessOrderService{
@Autowired @Autowired
private GeneraterSwapUtil generaterSwapUtil; private GeneraterSwapUtil2 generaterSwapUtil;
@Autowired @Autowired
private UserProvider userProvider; private UserProvider userProvider;
@ -770,6 +770,7 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
if((total>0 && AllIdList.size()>0) || total==0){ if((total>0 && AllIdList.size()>0) || total==0){
Page<BusinessOrderEntity> page=new Page<>(businessOrderPagination.getCurrentPage(), businessOrderPagination.getPageSize()); Page<BusinessOrderEntity> page=new Page<>(businessOrderPagination.getCurrentPage(), businessOrderPagination.getPageSize());
// IPage<BusinessOrderEntity> userIPage=this.page(page, businessOrderQueryWrapper); // IPage<BusinessOrderEntity> userIPage=this.page(page, businessOrderQueryWrapper);
IPage<BusinessOrderEntity> userIPage=businessOrderMapper.queryPurchaseOrder(page,businessOrderPagination, businessOrderQueryWrapper); IPage<BusinessOrderEntity> userIPage=businessOrderMapper.queryPurchaseOrder(page,businessOrderPagination, businessOrderQueryWrapper);
return businessOrderPagination.setData(userIPage.getRecords(),userIPage.getTotal()); return businessOrderPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{ }else{
@ -791,6 +792,11 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
return businessOrderMapper.queryTransitInventory(entity); return businessOrderMapper.queryTransitInventory(entity);
} }
@Override
public BigDecimal queryOccupyInventory(InventoryEntity entity) {
return businessOrderMapper.queryOccupyInventory(entity);
}
@Override @Override
public List<ProductByContractModel> queryProductByContractInfo(String id) { public List<ProductByContractModel> queryProductByContractInfo(String id) {
return businessOrderMapper.queryProductByContract(id); return businessOrderMapper.queryProductByContract(id);

@ -312,6 +312,9 @@ public class CwCostServiceImpl extends ServiceImpl<CwCostMapper, CwCostEntity> i
if("0".equals(dataType)){ if("0".equals(dataType)){
if((total>0 && AllIdList.size()>0) || total==0){ if((total>0 && AllIdList.size()>0) || total==0){
Page<CwCostEntity> page=new Page<>(cwCostPagination.getCurrentPage(), cwCostPagination.getPageSize()); Page<CwCostEntity> page=new Page<>(cwCostPagination.getCurrentPage(), cwCostPagination.getPageSize());
if("1".equals(cwCostPagination.getQueryFlowTaskPass())){
cwCostQueryWrapper.inSql("a.id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");
}
IPage<CwCostEntity> userIPage=this.page(page, cwCostQueryWrapper); IPage<CwCostEntity> userIPage=this.page(page, cwCostQueryWrapper);
return cwCostPagination.setData(userIPage.getRecords(),userIPage.getTotal()); return cwCostPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{ }else{

@ -497,6 +497,9 @@ public class CwaccountServiceImpl extends ServiceImpl<CwaccountMapper, Cwaccount
if("0".equals(dataType)){ if("0".equals(dataType)){
if((total>0 && AllIdList.size()>0) || total==0){ if((total>0 && AllIdList.size()>0) || total==0){
Page<CwaccountEntity> page=new Page<>(cwaccountPagination.getCurrentPage(), cwaccountPagination.getPageSize()); Page<CwaccountEntity> page=new Page<>(cwaccountPagination.getCurrentPage(), cwaccountPagination.getPageSize());
if("1".equals(cwaccountPagination.getQueryFlowTaskPass())){
cwaccountQueryWrapper.inSql("a.id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");
}
IPage<CwaccountEntity> userIPage=this.page(page, cwaccountQueryWrapper); IPage<CwaccountEntity> userIPage=this.page(page, cwaccountQueryWrapper);
return cwaccountPagination.setData(userIPage.getRecords(),userIPage.getTotal()); return cwaccountPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{ }else{

@ -510,4 +510,10 @@ public class ReturnCargoOrderServiceImpl extends ServiceImpl<ReturnCargoOrderMap
public BigDecimal queryTransitInventory(InventoryEntity entity) { public BigDecimal queryTransitInventory(InventoryEntity entity) {
return returnCargoOrderMapper.queryTransitInventory(entity); return returnCargoOrderMapper.queryTransitInventory(entity);
} }
@Override
public BigDecimal queryOccupyInventory(InventoryEntity entity) {
return returnCargoOrderMapper.queryOccupyInventory(entity);
}
} }

@ -326,19 +326,19 @@ public class SubjectaccountperiodrulesnoServiceImpl extends ServiceImpl<Subjecta
} }
//主表字段验证 //主表字段验证
//子表字段验证 //子表字段验证
if (form.getSubjectaccountperiodrulesList()!=null && form.getSubjectaccountperiodrulesList().size() == 5){ if (form.getSubjectaccountperiodrulesList()!=null && form.getSubjectaccountperiodrulesList().size() == 10){
List<SubjectaccountperiodrulesEntity> tableField102 = JsonUtil.getJsonToList(form.getSubjectaccountperiodrulesList(),SubjectaccountperiodrulesEntity.class); List<SubjectaccountperiodrulesEntity> tableField102 = JsonUtil.getJsonToList(form.getSubjectaccountperiodrulesList(),SubjectaccountperiodrulesEntity.class);
List<SubjectaccountperiodrulesEntity> list = tableField102.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() List<SubjectaccountperiodrulesEntity> list = tableField102.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(()
-> new TreeSet<>(Comparator.comparing(SubjectaccountperiodrulesEntity::getCreditRating))), ArrayList::new)); -> new TreeSet<>(Comparator.comparing(SubjectaccountperiodrulesEntity::getCreditRating).thenComparing(SubjectaccountperiodrulesEntity::getSettlementType))), ArrayList::new));
if(list == null || list.size() < 5){ if(list == null || list.size() < 10){
return "账期规则一星至五星只能配置一条"; return "账期规则先货后款和先款后货一星至五星只能配置一条";
} }
for(SubjectaccountperiodrulesModel t : form.getSubjectaccountperiodrulesList()){ for(SubjectaccountperiodrulesModel t : form.getSubjectaccountperiodrulesList()){
if(StringUtil.isNotEmpty(t.getAdvanceRatioDown())){ if(StringUtil.isEmpty(t.getAdvanceRatioDown()) && "2".equals(t.getSettlementType().toString())){
t.setAdvanceRatioDown(t.getAdvanceRatioDown().trim()); return "账期规则-预付比例最低不能为空";
} }
else{ else{
return "账期规则-预付比例最低不能为空"; t.setAdvanceRatioDown(StringUtil.isNotEmpty(t.getAdvanceRatioDown()) ? t.getAdvanceRatioDown().trim() : null);
} }
if(StringUtil.isNotEmpty(t.getAdvanceRatioDown())){ if(StringUtil.isNotEmpty(t.getAdvanceRatioDown())){
if(!Pattern.compile("^([1-9][\\d]*|0)(\\.[\\d]+)?$").matcher(String.valueOf(t.getAdvanceRatioDown())).matches()){ if(!Pattern.compile("^([1-9][\\d]*|0)(\\.[\\d]+)?$").matcher(String.valueOf(t.getAdvanceRatioDown())).matches()){
@ -347,18 +347,18 @@ public class SubjectaccountperiodrulesnoServiceImpl extends ServiceImpl<Subjecta
} }
} }
for(SubjectaccountperiodrulesModel t : form.getSubjectaccountperiodrulesList()){ for(SubjectaccountperiodrulesModel t : form.getSubjectaccountperiodrulesList()){
if(StringUtil.isNotEmpty(t.getAdvanceRatioUpper())){ if(StringUtil.isEmpty(t.getAdvanceRatioUpper()) && "2".equals(t.getSettlementType().toString())){
t.setAdvanceRatioUpper(t.getAdvanceRatioUpper().trim()); return "账期规则-预付比例最高不能为空";
} }
else{ else{
return "账期规则-预付比例最高不能为空"; t.setAdvanceRatioUpper(StringUtil.isNotEmpty(t.getAdvanceRatioUpper()) ? t.getAdvanceRatioUpper().trim() : null);
} }
if(StringUtil.isNotEmpty(t.getAdvanceRatioUpper())){ if(StringUtil.isNotEmpty(t.getAdvanceRatioUpper())){
if(!Pattern.compile("^([1-9][\\d]*|0)(\\.[\\d]+)?$").matcher(String.valueOf(t.getAdvanceRatioUpper())).matches()){ if(!Pattern.compile("^([1-9][\\d]*|0)(\\.[\\d]+)?$").matcher(String.valueOf(t.getAdvanceRatioUpper())).matches()){
return "请输入正确的金额"; return "请输入正确的金额";
} }
} }
if(new BigDecimal(t.getAdvanceRatioUpper()).compareTo(new BigDecimal(t.getAdvanceRatioDown())) <= 0){ if(StringUtil.isNotEmpty(t.getAdvanceRatioUpper()) && StringUtil.isNotEmpty(t.getAdvanceRatioDown()) && new BigDecimal(t.getAdvanceRatioUpper()).compareTo(new BigDecimal(t.getAdvanceRatioDown())) <= 0){
return "预付比例上限不得小于下限"; return "预付比例上限不得小于下限";
} }
} }
@ -426,7 +426,7 @@ public class SubjectaccountperiodrulesnoServiceImpl extends ServiceImpl<Subjecta
} }
} }
}else{ }else{
return "账期规则需要同时配置一星至五星"; return "账期规则先货后款和先款后货需要同时配置一星至五星";
} }
return countRecover; return countRecover;
} }

@ -458,6 +458,11 @@ public class WarehousingReceiveServiceImpl extends ServiceImpl<WarehousingReceiv
return warehousingReceiveMapper.queryTransitInventory(entity); return warehousingReceiveMapper.queryTransitInventory(entity);
} }
@Override
public BigDecimal queryOccupyInventory(InventoryEntity entity) {
return warehousingReceiveMapper.queryOccupyInventory(entity);
}
@Override @Override
public void saveOrUpdateWorkOrder(WarehousingReceiveForm warehousingReceiveForm, String id, boolean isSave) throws Exception { public void saveOrUpdateWorkOrder(WarehousingReceiveForm warehousingReceiveForm, String id, boolean isSave) throws Exception {
UserInfo userInfo=userProvider.get(); UserInfo userInfo=userProvider.get();

@ -110,6 +110,20 @@ public class InventoryController {
//5. 货权转移已确定出库但还未入库的库存(货权转移审核通过,记录转移数量为占用数量,转移出库但并未入库的数量为在途数量) //5. 货权转移已确定出库但还未入库的库存(货权转移审核通过,记录转移数量为占用数量,转移出库但并未入库的数量为在途数量)
//货权转移暂未开发 //货权转移暂未开发
entity.setTransitInventorySum(businessNumSum.add(usedreturnNumSum).add(saleReturnNumSum)); entity.setTransitInventorySum(businessNumSum.add(usedreturnNumSum).add(saleReturnNumSum));
//占用库存
//1. 1. 销售已确定,未出库的库存(销售中点击库存锁定。进行占用)
BigDecimal occupyBusinessNumSum = businessOrderService.queryOccupyInventory(entity);
//2. 调拨已确定,未出库的库存(调拨单审核通过,自动进行占用)
//3. 加工单已确定,未出库的库存(加工单审核通过,自动依据原材料明细进行占用,完成后,进行释放)
BigDecimal occupyUsedreturnNumSum = warehousingReceiveService.queryOccupyInventory(entity);
//4. 退供已确定,未出库的库存(退供单{采购退货}审核通过,自动进行占用)
BigDecimal occupySaleReturnNumSum = returnCargoOrderService.queryOccupyInventory(entity);
//5. 5. 货权转移已确定,未出库的库存(货权转移单审核通过,自动占用)
//货权转移暂未开发
entity.setOccupyInventorySum(occupyBusinessNumSum.add(occupyUsedreturnNumSum).add(occupySaleReturnNumSum));
//可用数量
entity.setAvailableInventorySum(entity.getInventoryNumberSum().subtract(entity.getOccupyInventorySum()));
} }
Map<String, Object> inventoryMap=JsonUtil.entityToMap(entity); Map<String, Object> inventoryMap=JsonUtil.entityToMap(entity);
inventoryMap.put("id", inventoryMap.get("id")); inventoryMap.put("id", inventoryMap.get("id"));

@ -422,7 +422,8 @@ public class WarehousingStorageController {
FlowTaskEntity flowTaskEntity = flowTaskService.getById(id); FlowTaskEntity flowTaskEntity = flowTaskService.getById(id);
if (flowTaskEntity!=null){ if (flowTaskEntity!=null){
QueryWrapper<FlowTaskNodeEntity> flowTaskNodeEntityQueryWrapper = new QueryWrapper<>(); QueryWrapper<FlowTaskNodeEntity> flowTaskNodeEntityQueryWrapper = new QueryWrapper<>();
flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getState, flowTaskEntity.getThisStepId()); //flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getState, flowTaskEntity.getThisStepId());
flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getNodeCode, flowTaskEntity.getThisStepId());
flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getTaskId, flowTaskEntity.getId()); flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getTaskId, flowTaskEntity.getId());
List<FlowTaskNodeEntity> flowTaskNodeEntityList = flowTaskNodeService.list(flowTaskNodeEntityQueryWrapper); List<FlowTaskNodeEntity> flowTaskNodeEntityList = flowTaskNodeService.list(flowTaskNodeEntityQueryWrapper);
if(flowTaskNodeEntityList != null && flowTaskNodeEntityList.size()>0 && "end".equals(flowTaskNodeEntityList.get(0).getNodeNext())) { if(flowTaskNodeEntityList != null && flowTaskNodeEntityList.size()>0 && "end".equals(flowTaskNodeEntityList.get(0).getNodeNext())) {

@ -87,5 +87,8 @@ public class InventoryEntity {
private BigDecimal inventoryNumberSum; private BigDecimal inventoryNumberSum;
@TableField(exist = false) @TableField(exist = false)
private BigDecimal transitInventorySum; private BigDecimal transitInventorySum;
@TableField(exist = false)
private BigDecimal occupyInventorySum;
@TableField(exist = false)
private BigDecimal availableInventorySum;
} }

@ -45,4 +45,6 @@ public class CwaccountPagination extends Pagination {
private List<String> idList; private List<String> idList;
private String contractCode; private String contractCode;
private String accountState; private String accountState;
@JsonProperty("queryFlowTaskPass")
private String queryFlowTaskPass;
} }

@ -47,4 +47,6 @@ public class CwCostPagination extends Pagination {
private Object costType; private Object costType;
private String subjectId; private String subjectId;
private List<String> excludeIdList; private List<String> excludeIdList;
@JsonProperty("queryFlowTaskPass")
private String queryFlowTaskPass;
} }

@ -1,176 +1,174 @@
<template> <template>
<el-dialog title="详情" <el-dialog title="详情" :close-on-click-modal="false" append-to-body :visible.sync="visible"
:close-on-click-modal="false" append-to-body class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1000px">
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll <el-row :gutter="15" class="">
width="1000px"> <el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right">
<el-row :gutter="15" class=""> <template v-if="!loading">
<el-form ref="formRef" :model="dataForm" size="small" label-width="100px" label-position="right" > <el-col :span="24">
<template v-if="!loading"> <jnpf-form-tip-item label="联系人头像" prop="logo">
<el-col :span="24" > <JnpfUploadImg v-model="dataForm.logo" disabled detailed :fileSize="10" sizeUnit="MB" :limit="1"
<jnpf-form-tip-item label="联系人头像" pathType="defaultPath" :isAccount="0">
prop="logo" > </JnpfUploadImg>
<JnpfUploadImg v-model="dataForm.logo" </jnpf-form-tip-item>
disabled </el-col>
detailed :fileSize="10" sizeUnit="MB" :limit="1" pathType="defaultPath" :isAccount="0" > <el-col :span="24">
</JnpfUploadImg> <jnpf-form-tip-item label="联系人类型" prop="contactsType">
</jnpf-form-tip-item> <p>{{ dataForm.contactsType }} </p>
</el-col> </jnpf-form-tip-item>
<el-col :span="24" > </el-col>
<jnpf-form-tip-item label="联系人类型" <el-col :span="24">
prop="contactsType" > <jnpf-form-tip-item label="关联客户" prop="subjectBasicId">
<p>{{ dataForm.contactsType }} </p> <p>{{dataForm.subjectBasicId}}</p>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<jnpf-form-tip-item label="关联客户" <jnpf-form-tip-item label="姓名" prop="name">
prop="subjectBasicId" > <p>{{dataForm.name}}</p>
<p>{{dataForm.subjectBasicId}}</p> </jnpf-form-tip-item>
</jnpf-form-tip-item> </el-col>
</el-col> <el-col :span="24">
<el-col :span="24" > <jnpf-form-tip-item label="职务" prop="position">
<jnpf-form-tip-item label="姓名" <p>{{dataForm.position}}</p>
prop="name" > </jnpf-form-tip-item>
<p>{{dataForm.name}}</p> </el-col>
</jnpf-form-tip-item> <el-col :span="24">
</el-col> <jnpf-form-tip-item label="公司" prop="companyName">
<el-col :span="24" > <p>{{dataForm.companyName}}</p>
<jnpf-form-tip-item label="职务" </jnpf-form-tip-item>
prop="position" > </el-col>
<p>{{dataForm.position}}</p> <el-col :span="24">
</jnpf-form-tip-item> <jnpf-form-tip-item label="手机" prop="mobile">
</el-col> <p>{{dataForm.mobile}}</p>
<el-col :span="24" > </jnpf-form-tip-item>
<jnpf-form-tip-item label="公司" </el-col>
prop="companyName" > <el-col :span="24">
<p>{{dataForm.companyName}}</p> <jnpf-form-tip-item label="电话" prop="phone">
</jnpf-form-tip-item> <p>{{dataForm.phone}}</p>
</el-col> </jnpf-form-tip-item>
<el-col :span="24" > </el-col>
<jnpf-form-tip-item label="手机" <el-col :span="24">
prop="mobile" > <jnpf-form-tip-item label="邮箱" prop="emaile">
<p>{{dataForm.mobile}}</p> <p>{{dataForm.emaile}}</p>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24">
<jnpf-form-tip-item label="电话" <jnpf-form-tip-item label="地址" prop="address">
prop="phone" > <p>{{dataForm.address}}</p>
<p>{{dataForm.phone}}</p> </jnpf-form-tip-item>
</jnpf-form-tip-item> </el-col>
</el-col> <el-col :span="24">
<el-col :span="24" > <jnpf-form-tip-item label="是否星标" prop="markColor">
<jnpf-form-tip-item label="邮箱" <p>{{dataForm.markColor}}</p>
prop="emaile" > </jnpf-form-tip-item>
<p>{{dataForm.emaile}}</p> </el-col>
</jnpf-form-tip-item> <el-col :span="24">
</el-col> <jnpf-form-tip-item label="附件" prop="annex">
<el-col :span="24" > <JnpfUploadFile v-model="dataForm.annex" disabled detailed :fileSize="10" sizeUnit="MB" :limit="9"
<jnpf-form-tip-item label="地址" pathType="defaultPath" :isAccount="0" buttonText="点击上传">
prop="address" > </JnpfUploadFile>
<p>{{dataForm.address}}</p> </jnpf-form-tip-item>
</jnpf-form-tip-item> </el-col>
</el-col> </template>
<el-col :span="24" > </el-form>
<jnpf-form-tip-item label="是否星标"
prop="markColor" >
<p>{{dataForm.markColor}}</p>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24" >
<jnpf-form-tip-item label="附件"
prop="annex" >
<JnpfUploadFile v-model="dataForm.annex"
disabled
detailed :fileSize="10" sizeUnit="MB" :limit="9" pathType="defaultPath" :isAccount="0" buttonText="点击上传" >
</JnpfUploadFile>
</jnpf-form-tip-item>
</el-col>
</template>
</el-form>
</el-row> </el-row>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
</span> </span>
<Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" /> <Detail v-if="detailVisible" ref="Detail" @close="detailVisible = false" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import { getConfigData } from '@/api/onlineDev/visualDev' import {
import jnpf from '@/utils/jnpf' getConfigData
import Detail from '@/views/basic/dynamicModel/list/detail' } from '@/api/onlineDev/visualDev'
import { thousandsFormat } from "@/components/Generator/utils/index" import jnpf from '@/utils/jnpf'
export default { import Detail from '@/views/basic/dynamicModel/list/detail'
components: { Detail}, import {
props: [], thousandsFormat
data() { } from "@/components/Generator/utils/index"
return { export default {
visible: false, components: {
detailVisible: false, Detail
loading: false, },
props: [],
data() {
return {
visible: false,
detailVisible: false,
loading: false,
dataForm: { dataForm: {
id :'', id: '',
logo : [], logo: [],
contactsType : "2", contactsType: "2",
subjectBasicId : "", subjectBasicId: "",
name : '', name: '',
position : '', position: '',
companyName : '', companyName: '',
mobile : '', mobile: '',
phone : '', phone: '',
emaile : '', emaile: '',
address : '', address: '',
markColor : 0, markColor: 0,
annex : [], annex: [],
},
contactsTypeOptions:[{"fullName":"默认","id":"1"},{"fullName":"联系人","id":"2"}],
contactsTypeProps:{"label":"fullName","value":"id" },
}
}, },
computed: {}, contactsTypeOptions: [{
watch: {}, "fullName": "默认",
created() { "id": "1"
}, {
"fullName": "联系人",
"id": "2"
}],
contactsTypeProps: {
"label": "fullName",
"value": "id"
}, },
mounted() {},
methods: {
toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(formData, modelId, defaultValue)
})
})
},
dataInfo(dataAll){
let _dataAll =dataAll
this.dataForm = _dataAll
},
init(id) { }
this.dataForm.id = id || 0; },
this.visible = true; computed: {},
this.$nextTick(() => { watch: {},
if(this.dataForm.id){ created() {
this.loading = true
request({
url: '/api/scm/Contacts/detail/'+this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
})
}
}) },
}, mounted() {},
}, methods: {
} toDetail(defaultValue, modelId) {
if (!defaultValue) return
getConfigData(modelId).then(res => {
if (!res.data || !res.data.formData) return
let formData = JSON.parse(res.data.formData)
formData.popupType = 'general'
this.detailVisible = true
this.$nextTick(() => {
this.$refs.Detail.init(formData, modelId, defaultValue)
})
})
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
},
init(id) {
this.dataForm.id = id || 0;
this.visible = true;
this.$nextTick(() => {
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/scm/Contacts/detail/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
})
}
})
},
},
}
</script> </script>

@ -73,13 +73,13 @@
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.advanceRatioDown" <JnpfInput v-model="scope.row.advanceRatioDown"
@change="changeData('subjectaccountperiodrules-advanceRatioDown',scope.$index)" placeholder="请输入" @change="changeData('subjectaccountperiodrules-advanceRatioDown',scope.$index)" placeholder="请输入"
:disabled="judgeWrite('subjectaccountperiodrulesList')||judgeWrite('subjectaccountperiodrulesList-advanceRatioDown')" :disabled="judgeWrite('subjectaccountperiodrulesList')||judgeWrite('subjectaccountperiodrulesList-advanceRatioDown') || scope.row.settlementType == 1"
clearable :style='{"width":"40%"}'> clearable :style='{"width":"40%"}'>
</JnpfInput> </JnpfInput>
<label></label> <label></label>
<JnpfInput v-model="scope.row.advanceRatioUpper" <JnpfInput v-model="scope.row.advanceRatioUpper"
@change="changeData('subjectaccountperiodrules-advanceRatioUpper',scope.$index)" placeholder="请输入" @change="changeData('subjectaccountperiodrules-advanceRatioUpper',scope.$index)" placeholder="请输入"
:disabled="judgeWrite('subjectaccountperiodrulesList')||judgeWrite('subjectaccountperiodrulesList-advanceRatioUpper')" :disabled="judgeWrite('subjectaccountperiodrulesList')||judgeWrite('subjectaccountperiodrulesList-advanceRatioUpper') || scope.row.settlementType == 1"
clearable :style='{"width":"40%"}'> clearable :style='{"width":"40%"}'>
</JnpfInput> </JnpfInput>
</template> </template>
@ -525,7 +525,7 @@
isOk = false isOk = false
break break
} }
if (!e.advanceRatioDown) { if (!e.advanceRatioDown && e.settlementType == '2') {
this.$message({ this.$message({
message: '预付比例最低不能为空', message: '预付比例最低不能为空',
type: 'error', type: 'error',
@ -533,26 +533,27 @@
}); });
isOk = false isOk = false
break break
} }else{
if (e.advanceRatioDown) { if (e.advanceRatioDown) {
var regPos = [{ var regPos = [{
"pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/", "pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/",
"message": "请输入正确的金额" "message": "请输入正确的金额"
}] }]
for (let i = 0; i < regPos.length; i++) { for (let i = 0; i < regPos.length; i++) {
const element = regPos[i]; const element = regPos[i];
if (element.pattern && !eval(element.pattern).test(e.advanceRatioDown)) { if (element.pattern && !eval(element.pattern).test(e.advanceRatioDown)) {
this.$message({ this.$message({
message: element.message, message: element.message,
type: 'error', type: 'error',
duration: 1000 duration: 1000
}); });
isOk = false isOk = false
break; break;
}
} }
} }
} }
if (!e.advanceRatioUpper) { if (!e.advanceRatioUpper && e.settlementType == '2') {
this.$message({ this.$message({
message: '预付比例最高不能为空', message: '预付比例最高不能为空',
type: 'error', type: 'error',
@ -560,22 +561,23 @@
}); });
isOk = false isOk = false
break break
} }else{
if (e.advanceRatioUpper) { if (e.advanceRatioUpper) {
var regPos = [{ var regPos = [{
"pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/", "pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/",
"message": "请输入正确的金额" "message": "请输入正确的金额"
}] }]
for (let i = 0; i < regPos.length; i++) { for (let i = 0; i < regPos.length; i++) {
const element = regPos[i]; const element = regPos[i];
if (element.pattern && !eval(element.pattern).test(e.advanceRatioUpper)) { if (element.pattern && !eval(element.pattern).test(e.advanceRatioUpper)) {
this.$message({ this.$message({
message: element.message, message: element.message,
type: 'error', type: 'error',
duration: 1000 duration: 1000
}); });
isOk = false isOk = false
break; break;
}
} }
} }
} }

@ -1735,10 +1735,28 @@
cwaccountsubjectsubjectIdcolumnOptions: [{ cwaccountsubjectsubjectIdcolumnOptions: [{
"label": "名称", "label": "名称",
"value": "name" "value": "name"
}, ], }, {
"label": "分类",
"value": "calssifyName"
}, {
"label": "星级",
"value": "customerStarRatingName"
}, {
"label": "归属人员",
"value": "belongPeopleName"
}],
cwaccountcontractcontractIdcolumnOptions: [{ cwaccountcontractcontractIdcolumnOptions: [{
"label": "合同编码",
"value": "contract_number"
}, {
"label": "合同名称", "label": "合同名称",
"value": "contract_name" "value": "contract_name"
}, {
"label": "类型",
"value": "contractTypeName"
}, {
"label": "名称",
"value": "subjectName"
}, ], }, ],
cwaccountcontractsubjectcolumnOptions: [{ cwaccountcontractsubjectcolumnOptions: [{
"label": "主体名称", "label": "主体名称",

@ -1852,8 +1852,17 @@
"value": "name" "value": "name"
}, ], }, ],
cwsettlementcontractcontractIdcolumnOptions: [{ cwsettlementcontractcontractIdcolumnOptions: [{
"label": "合同编码",
"value": "contract_number"
}, {
"label": "合同名称", "label": "合同名称",
"value": "contract_name" "value": "contract_name"
}, {
"label": "类型",
"value": "contractTypeName"
}, {
"label": "名称",
"value": "subjectName"
}, ], }, ],
cwsettlementaccounttypeOptions: [{ cwsettlementaccounttypeOptions: [{
"fullName": "采购对账", "fullName": "采购对账",
@ -1930,10 +1939,6 @@
"label": "名称", "label": "名称",
"value": "name" "value": "name"
}, ], }, ],
cwsettlementcontractcontractIdcolumnOptions: [{
"label": "合同名称",
"value": "contract_name"
}, ],
cwsettlementcontractsubjectcolumnOptions: [{ cwsettlementcontractsubjectcolumnOptions: [{
"label": "主体名称", "label": "主体名称",
"value": "name" "value": "name"

@ -103,6 +103,7 @@ export default {
contractCode: contractCode, contractCode: contractCode,
accountState: accountState, accountState: accountState,
dataType: 0, dataType: 0,
queryFlowTaskPass: '1'//
} }
/* GoodsList(query).then(res => { /* GoodsList(query).then(res => {
this.list = res.data.list this.list = res.data.list

@ -112,6 +112,7 @@ export default {
subjectId: this.subjectId, subjectId: this.subjectId,
excludeIdList: this.excludeIdList, excludeIdList: this.excludeIdList,
dataType: 0, dataType: 0,
queryFlowTaskPass: '1'//
} }
/* GoodsList(query).then(res => { /* GoodsList(query).then(res => {
this.list = res.data.list this.list = res.data.list

@ -73,13 +73,13 @@
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.advanceRatioDown" <JnpfInput v-model="scope.row.advanceRatioDown"
@change="changeData('subjectaccountperiodrules-advanceRatioDown',scope.$index)" placeholder="请输入" @change="changeData('subjectaccountperiodrules-advanceRatioDown',scope.$index)" placeholder="请输入"
:disabled="judgeWrite('subjectaccountperiodrulesList')||judgeWrite('subjectaccountperiodrulesList-advanceRatioDown')" :disabled="judgeWrite('subjectaccountperiodrulesList')||judgeWrite('subjectaccountperiodrulesList-advanceRatioDown') || scope.row.settlementType == 1"
clearable :style='{"width":"40%"}'> clearable :style='{"width":"40%"}'>
</JnpfInput> </JnpfInput>
<label></label> <label></label>
<JnpfInput v-model="scope.row.advanceRatioUpper" <JnpfInput v-model="scope.row.advanceRatioUpper"
@change="changeData('subjectaccountperiodrules-advanceRatioUpper',scope.$index)" placeholder="请输入" @change="changeData('subjectaccountperiodrules-advanceRatioUpper',scope.$index)" placeholder="请输入"
:disabled="judgeWrite('subjectaccountperiodrulesList')||judgeWrite('subjectaccountperiodrulesList-advanceRatioUpper')" :disabled="judgeWrite('subjectaccountperiodrulesList')||judgeWrite('subjectaccountperiodrulesList-advanceRatioUpper') || scope.row.settlementType == 1"
clearable :style='{"width":"40%"}'> clearable :style='{"width":"40%"}'>
</JnpfInput> </JnpfInput>
</template> </template>
@ -525,7 +525,7 @@
isOk = false isOk = false
break break
} }
if (!e.advanceRatioDown) { if (!e.advanceRatioDown && e.settlementType == '2') {
this.$message({ this.$message({
message: '预付比例最低不能为空', message: '预付比例最低不能为空',
type: 'error', type: 'error',
@ -533,26 +533,27 @@
}); });
isOk = false isOk = false
break break
} }else{
if (e.advanceRatioDown) { if (e.advanceRatioDown) {
var regPos = [{ var regPos = [{
"pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/", "pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/",
"message": "请输入正确的金额" "message": "请输入正确的金额"
}] }]
for (let i = 0; i < regPos.length; i++) { for (let i = 0; i < regPos.length; i++) {
const element = regPos[i]; const element = regPos[i];
if (element.pattern && !eval(element.pattern).test(e.advanceRatioDown)) { if (element.pattern && !eval(element.pattern).test(e.advanceRatioDown)) {
this.$message({ this.$message({
message: element.message, message: element.message,
type: 'error', type: 'error',
duration: 1000 duration: 1000
}); });
isOk = false isOk = false
break; break;
}
} }
} }
} }
if (!e.advanceRatioUpper) { if (!e.advanceRatioUpper && e.settlementType == '2') {
this.$message({ this.$message({
message: '预付比例最高不能为空', message: '预付比例最高不能为空',
type: 'error', type: 'error',
@ -560,22 +561,23 @@
}); });
isOk = false isOk = false
break break
} }else{
if (e.advanceRatioUpper) { if (e.advanceRatioUpper) {
var regPos = [{ var regPos = [{
"pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/", "pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/",
"message": "请输入正确的金额" "message": "请输入正确的金额"
}] }]
for (let i = 0; i < regPos.length; i++) { for (let i = 0; i < regPos.length; i++) {
const element = regPos[i]; const element = regPos[i];
if (element.pattern && !eval(element.pattern).test(e.advanceRatioUpper)) { if (element.pattern && !eval(element.pattern).test(e.advanceRatioUpper)) {
this.$message({ this.$message({
message: element.message, message: element.message,
type: 'error', type: 'error',
duration: 1000 duration: 1000
}); });
isOk = false isOk = false
break; break;
}
} }
} }
} }

@ -73,13 +73,13 @@
<template slot-scope="scope"> <template slot-scope="scope">
<JnpfInput v-model="scope.row.advanceRatioDown" <JnpfInput v-model="scope.row.advanceRatioDown"
@change="changeData('subjectaccountperiodrules-advanceRatioDown',scope.$index)" placeholder="请输入" @change="changeData('subjectaccountperiodrules-advanceRatioDown',scope.$index)" placeholder="请输入"
:disabled="judgeWrite('subjectaccountperiodrulesList')||judgeWrite('subjectaccountperiodrulesList-advanceRatioDown')" :disabled="judgeWrite('subjectaccountperiodrulesList')||judgeWrite('subjectaccountperiodrulesList-advanceRatioDown') || scope.row.settlementType == 1"
clearable :style='{"width":"40%"}'> clearable :style='{"width":"40%"}'>
</JnpfInput> </JnpfInput>
<label></label> <label></label>
<JnpfInput v-model="scope.row.advanceRatioUpper" <JnpfInput v-model="scope.row.advanceRatioUpper"
@change="changeData('subjectaccountperiodrules-advanceRatioUpper',scope.$index)" placeholder="请输入" @change="changeData('subjectaccountperiodrules-advanceRatioUpper',scope.$index)" placeholder="请输入"
:disabled="judgeWrite('subjectaccountperiodrulesList')||judgeWrite('subjectaccountperiodrulesList-advanceRatioUpper')" :disabled="judgeWrite('subjectaccountperiodrulesList')||judgeWrite('subjectaccountperiodrulesList-advanceRatioUpper') || scope.row.settlementType == 1"
clearable :style='{"width":"40%"}'> clearable :style='{"width":"40%"}'>
</JnpfInput> </JnpfInput>
</template> </template>
@ -525,7 +525,7 @@
isOk = false isOk = false
break break
} }
if (!e.advanceRatioDown) { if (!e.advanceRatioDown && e.settlementType == '2') {
this.$message({ this.$message({
message: '预付比例最低不能为空', message: '预付比例最低不能为空',
type: 'error', type: 'error',
@ -533,26 +533,27 @@
}); });
isOk = false isOk = false
break break
} }else{
if (e.advanceRatioDown) { if (e.advanceRatioDown) {
var regPos = [{ var regPos = [{
"pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/", "pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/",
"message": "请输入正确的金额" "message": "请输入正确的金额"
}] }]
for (let i = 0; i < regPos.length; i++) { for (let i = 0; i < regPos.length; i++) {
const element = regPos[i]; const element = regPos[i];
if (element.pattern && !eval(element.pattern).test(e.advanceRatioDown)) { if (element.pattern && !eval(element.pattern).test(e.advanceRatioDown)) {
this.$message({ this.$message({
message: element.message, message: element.message,
type: 'error', type: 'error',
duration: 1000 duration: 1000
}); });
isOk = false isOk = false
break; break;
}
} }
} }
} }
if (!e.advanceRatioUpper) { if (!e.advanceRatioUpper && e.settlementType == '2') {
this.$message({ this.$message({
message: '预付比例最高不能为空', message: '预付比例最高不能为空',
type: 'error', type: 'error',
@ -560,22 +561,23 @@
}); });
isOk = false isOk = false
break break
} }else{
if (e.advanceRatioUpper) { if (e.advanceRatioUpper) {
var regPos = [{ var regPos = [{
"pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/", "pattern": "/^([1-9][\\d]*|0)(\\.[\\d]+)?$/",
"message": "请输入正确的金额" "message": "请输入正确的金额"
}] }]
for (let i = 0; i < regPos.length; i++) { for (let i = 0; i < regPos.length; i++) {
const element = regPos[i]; const element = regPos[i];
if (element.pattern && !eval(element.pattern).test(e.advanceRatioUpper)) { if (element.pattern && !eval(element.pattern).test(e.advanceRatioUpper)) {
this.$message({ this.$message({
message: element.message, message: element.message,
type: 'error', type: 'error',
duration: 1000 duration: 1000
}); });
isOk = false isOk = false
break; break;
}
} }
} }
} }

@ -1,149 +1,172 @@
<template> <template>
<div class="formula-fixed-profit"> <div class="formula-fixed-profit-a csty-formula-box">
<div class="formula-box"> <div class="formula-fixed-profit-a csty-formula">
<div class="formula-item"> <div class="csty-formula-box-x">
<span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" <div class="csty-formula-box-y">
style="height:1.2173em;vertical-align:-0.345em;"></span><span class="mord"><span <div class="csty-formula-item">
class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span <div class="csty-formula-box-x">
class="vlist-r"><span class="vlist" style="height:0.8723em;"><span style="top:-2.655em;"><span <div class="csty-formula-item">客户销售结算金额含税</div>
class="pstrut" style="height:3em;"></span><span <div class="csty-formula-item">-</div>
class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span <div class="csty-formula-item">
class="mord cjk_fallback mtight"><el-input class="formula-input-bottom" <template v-if="value.priceFormulaType == 'fixedProfit'">
v-model="value.settlementTonnage" placeholder="结算吨数" <el-input
style="top:4"></el-input></span></span></span></span><span style="top:-3.23em;"><span class="csty-formula-input"
class="pstrut" style="height:3em;"></span><span class="frac-line" v-model="value.fixedProfit1"
style="border-bottom-width:0.04em;"></span></span><span style="top:-3.394em;"><span placeholder="固定利润1"
class="pstrut" style="height:3em;"></span><span size="mini"
class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span ></el-input>
class="mord cjk_fallback mtight">客户销售结算金额含税</span><span class="mbin mtight"></span> </template>
<span class="mord mtight"><el-input class="formula-input-top" v-model="value.fixedProfit1" <template v-else>
placeholder="固定利润1"></el-input></span> 固定利润1
<span class="mbin mtight"></span><el-input class="formula-input-top" </template>
v-model="value.otherCost1" placeholder="其他费用1"></el-input><span </div>
class="mbin mtight">+</span><el-input class="formula-input-top" <div class="csty-formula-item">-</div>
v-model="value.otherCost2" placeholder="其他费用2"></el-input><span <div class="csty-formula-item">
class="mrel mtight">=</span><span <template v-if="value.priceFormulaType == 'fixedProfit'">
class="mord cjk_fallback mtight">理论销售结算金额含税</span></span></span></span></span><span <el-input
class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" class="csty-formula-input"
style="height:0.345em;"><span></span></span></span></span></span><span v-model="value.otherCost1"
class="mclose nulldelimiter"></span></span><span class="mspace" placeholder="其他费用1"
style="margin-right:0.2222em;"></span><span class="mbin"></span><span class="mspace" size="mini"
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" ></el-input>
style="height:0.7667em;vertical-align:-0.0833em;"></span><el-input class="formula-input-center" </template>
v-model="value.fixedProfit2" placeholder="固定利润2"></el-input><span class="mspace" <template v-else>
style="margin-right:0.2222em;"></span><span class="mbin"></span><span class="mspace" 其他费用1
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" </template>
style="height:0.7667em;vertical-align:-0.0833em;"></span><el-input class="formula-input-center" </div>
v-model="value.otherCost3" placeholder="其他费用3"></el-input><span class="mspace" <div class="csty-formula-item">-</div>
style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" <div class="csty-formula-item">
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" <template v-if="value.priceFormulaType == 'fixedProfit'">
style="height:0.6833em;"></span><el-input class="formula-input-center" v-model="value.otherCost4" <el-input
placeholder="其他费用4"></el-input><span class="mspace" style="margin-right:0.2778em;"></span><span class="csty-formula-input"
class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span v-model="value.otherCost2"
class="base"><span class="strut" style="height:0.6833em;"></span><span placeholder="其他费用2"
class="mord cjk_fallback">采购单价含税</span></span></span></span> size="mini"
></el-input>
</template>
<template v-else>
其他费用2
</template>
</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">理论销售结算金额含税</div>
</div>
</div>
<div class="csty-formula-line"></div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'fixedProfit'">
<el-input
class="csty-formula-input"
v-model="value.settlementTonnage"
placeholder="结算吨数"
size="mini"
></el-input>
</template>
<template v-else>
结算吨数
</template>
</div>
</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'fixedProfit'">
<el-input
class="csty-formula-input"
v-model="value.fixedProfit2"
placeholder="固定利润2"
size="mini"
></el-input>
</template>
<template v-else>
固定利润2
</template>
</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'fixedProfit'">
<el-input
class="csty-formula-input"
v-model="value.otherCost3"
placeholder="其他费用3"
size="mini"
></el-input>
</template>
<template v-else>
其他费用3
</template>
</div>
<div class="csty-formula-item">+</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'fixedProfit'">
<el-input
class="csty-formula-input"
v-model="value.otherCost4"
placeholder="其他费用4"
size="mini"
></el-input>
</template>
<template v-else>
其他费用4
</template>
</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">采购单价含税</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import katex from 'katex';
import 'katex/dist/katex.min.css';
export default { export default {
props: ['value'], props: ["value"],
components: { components: {},
},
data() { data() {
return { return {};
}
},
computed: {
},
created() {
}, },
mounted() { computed: {},
this.$nextTick(function () { created() {},
// var htmlA = katex.renderToString(String.raw` mounted() {},
// \frac {- \boxed{1} - \boxed{1} + \boxed{2} methods: {}
// = }{\boxed{}} - \boxed{2} - \boxed{3} + \boxed{4} };
// =
// `, {
// throwOnError: false
// })
// var htmlA = katex.renderToString(String.raw`
// \frac { - 1 - 1 + 2
// = }{} - 2 - 3 + 4
// =
// `, {
// throwOnError: false
// })
// console.log(htmlA)
})
},
methods: {
}
}
</script> </script>
<style scoped> <style scoped>
.formula-fixed-profit { .csty-formula-box {
width: 100%; width: 100%;
overflow: auto; overflow-x: auto;
font-size: 14px;
color: #606266;
padding: 15px; padding: 15px;
margin: 10px;
background-color: aliceblue;
border-radius: 5px;
} }
.csty-formula {
.formula-box { min-width: 1400px;
width: 1500px;
padding: 30px;
} }
.csty-formula-box-x {
::v-deep .formula-input-top { display: flex;
width: 80px; flex-direction: row;
display: inline-block; align-items: center;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: -4px;
} }
.csty-formula-box-y {
::v-deep .formula-input-top .el-input__inner { display: flex;
padding: 0px 5px; flex-direction: column;
height: 20px; align-items: center;
line-height: 20px;
} }
.csty-formula-item {
::v-deep .formula-input-bottom { padding: 5px 5px;
width: 80px;
display: inline-block;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 6px;
} }
.csty-formula-item-y {
::v-deep .formula-input-bottom .el-input__inner { padding: 5px 5px;
padding: 0px 5px; width: 100%;
height: 20px;
line-height: 20px;
} }
.csty-formula-line {
::v-deep .formula-input-center { border-bottom: 1px solid #000;
width: 80px; width: 100%;
display: inline-block; height: 0;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 0px;
} }
.csty-formula-input {
::v-deep .formula-input-center .el-input__inner { width: 110px;
padding: 0px 5px;
height: 20px;
line-height: 20px;
} }
</style> </style>

@ -1,138 +1,150 @@
<template> <template>
<div class="formula-money-rate"> <div class="formula-money-rate csty-formula-box">
<div class="formula-box"> <div class="csty-formula">
<div class="formula-item"><span class="katex"> <div class="csty-formula-box-x">
<span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" <div class="csty-formula-box-y">
style="height:1.355em;vertical-align:-0.345em;"></span><span class="mord"><span <div class="csty-formula-box-x">
class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span <div class="csty-formula-item">总资金利息</div>
class="vlist-r"><span class="vlist" style="height:1.01em;"><span style="top:-2.655em;"><span <div class="csty-formula-item">=</div>
class="pstrut" style="height:3em;"></span><span <div class="csty-formula-item">销售总金额含税</div>
class="sizing reset-size6 size3 mtight"><span class="mord mtight"><el-input <div class="csty-formula-item">x</div>
class="formula-input-bottom" v-model="value.correspondTonnage" <div class="csty-formula-item">(</div>
placeholder="对应吨数"></el-input></span></span></span><span style="top:-3.23em;"><span <div class="csty-formula-item">1</div>
class="pstrut" style="height:3em;"></span><span class="frac-line" <div class="csty-formula-item">+</div>
style="border-bottom-width:0.04em;"></span></span><span style="top:-3.485em;"><span <div class="csty-formula-item">
class="pstrut" style="height:3em;"></span><span <template v-if="value.priceFormulaType == 'moneyRate'">
class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span <el-input
class="mord cjk_fallback mtight">总资金利息</span><span class="mrel mtight">=</span><span class="csty-formula-input"
class="mord cjk_fallback mtight">销售总金额含税</span><span class="mbin mtight">×</span><span v-model="value.fundRate"
class="mopen mtight">(</span><span class="mord mtight">1</span><span placeholder="资金利率"
class="mbin mtight">+</span><el-input class="formula-input-top" v-model="value.fundRate" size="mini"
placeholder="资金利率"></el-input><span class="mclose mtight">)</span><span ></el-input>
class="mbin mtight"></span><el-input class="formula-input-top" </template>
v-model="value.fixedAmount" placeholder="固定利润1"></el-input><span <template v-else>
class="mbin mtight"></span><el-input class="formula-input-top" 资金利率
v-model="value.otherCost1" placeholder="其他费用1"></el-input><span </template>
class="mbin mtight">+</span><el-input class="formula-input-top" </div>
v-model="value.otherCost2" <div class="csty-formula-item">)</div>
placeholder="其他费用2"></el-input></span></span></span></span><span <div class="csty-formula-item">-</div>
class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" <div class="csty-formula-item">
style="height:0.345em;"><span></span></span></span></span></span><span <template v-if="value.priceFormulaType == 'moneyRate'">
class="mclose nulldelimiter"></span></span><span class="mspace" <el-input
style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" class="csty-formula-input"
style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" v-model="value.fixedProfit1"
style="height:0.6833em;"></span><span class="mord cjk_fallback">销售单价含税</span></span></span></span> placeholder="固定利润1"
size="mini"
></el-input>
</template>
<template v-else>
固定利润1
</template>
</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'moneyRate'">
<el-input
class="csty-formula-input"
v-model="value.otherCost1"
placeholder="其他费用1"
size="mini"
></el-input>
</template>
<template v-else>
其他费用1
</template>
</div>
<div class="csty-formula-item">+</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'moneyRate'">
<el-input
class="csty-formula-input"
v-model="value.otherCost2"
placeholder="其他费用2"
size="mini"
></el-input>
</template>
<template v-else>
其他费用2
</template>
</div>
</div>
<div class="csty-formula-line"></div>
<div class="csty-formula-box-x">
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'moneyRate'">
<el-input
class="csty-formula-input"
v-model="value.correspondTonnage"
placeholder="对应吨数"
size="mini"
></el-input>
</template>
<template v-else>
对应吨数
</template>
</div>
</div>
</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">销售单价含税</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import katex from 'katex';
import 'katex/dist/katex.min.css';
export default { export default {
props: ['value'], props: ["value"],
components: { components: {},
},
data() { data() {
return { return {};
}
},
computed: {
},
created() {
}, },
computed: {},
created() {},
mounted() { mounted() {
this.$nextTick(function () { this.$nextTick(function() {});
// var htmlD = katex.renderToString(String.raw`
// \frac {
// = \times \lparen 1 + \boxed{} \rparen - \boxed{1} - \boxed{1} + \boxed{2}} {\boxed{}}
// =
// `, {
// throwOnError: false
// });
// var htmlD = katex.renderToString(String.raw`
// \frac {
// = \times \lparen 1 + \rparen - 1 - 1 + 2} {}
// =
// `, {
// throwOnError: false
// });
// console.log(htmlD)
})
}, },
methods: { methods: {}
} };
}
</script> </script>
<style scoped> <style scoped>
.formula-money-rate { .csty-formula-box {
width: 100%; width: 100%;
overflow: auto; overflow-x: auto;
font-size: 14px;
color: #606266;
padding: 15px; padding: 15px;
margin: 10px;
background-color: aliceblue;
border-radius: 5px;
} }
.csty-formula {
.formula-box { min-width: 1000px;
width: 1500px;
padding: 30px;
} }
.csty-formula-box-x {
::v-deep .formula-input-top { display: flex;
width: 80px; flex-direction: row;
display: inline-block; align-items: center;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: -4px;
} }
.csty-formula-box-y {
::v-deep .formula-input-top .el-input__inner { display: flex;
padding: 0px 5px; flex-direction: column;
height: 20px; align-items: center;
line-height: 20px;
} }
.csty-formula-item {
::v-deep .formula-input-bottom { padding: 5px 5px;
width: 80px;
display: inline-block;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 6px;
} }
.csty-formula-item-y {
::v-deep .formula-input-bottom .el-input__inner { padding: 5px 5px;
padding: 0px 5px; width: 100%;
height: 20px;
line-height: 20px;
} }
.csty-formula-line {
::v-deep .formula-input-center { border-bottom: 1px solid #606266;
width: 80px; width: 100%;
display: inline-block; height: 0;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 0px;
} }
.csty-formula-input {
::v-deep .formula-input-center .el-input__inner { width: 110px;
padding: 0px 5px;
height: 20px;
line-height: 20px;
} }
</style> </style>

@ -1,126 +1,114 @@
<template> <template>
<div class="formula-out-process-service"> <div class="formula-out-process-service csty-formula-box">
<div class="formula-box"> <div class="csty-formula">
<div class="formula-item">垫付采购单价=市场价</div> <div class="csty-formula-box-x">
<div class="formula-item">实际销售单价=实际客户价</div> <div class="csty-formula-item">垫付采购单价</div>
<div class="formula-item"><span class="katex"> <div class="csty-formula-item">=</div>
<span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" <div class="csty-formula-item">市场价</div>
style="height:0.6833em;"></span><span class="mord cjk_fallback">加工费运费</span><span class="mspace" </div>
style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" <div class="csty-formula-box-x">
style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" <div class="csty-formula-item">实际销售单价</div>
style="height:0.7667em;vertical-align:-0.0833em;"></span><span <div class="csty-formula-item">=</div>
class="mord cjk_fallback">实际销售单价不含税</span><span class="mspace" <div class="csty-formula-item">实际客户价</div>
style="margin-right:0.2222em;"></span><span class="mbin">×</span><span class="mspace" </div>
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" <div class="csty-formula-box-x">
style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span <div class="csty-formula-item">加工费运费</div>
class="mord">1</span><span class="mspace" style="margin-right:0.2222em;"></span><span <div class="csty-formula-item">=</div>
class="mbin"></span><span class="mspace" style="margin-right:0.2222em;"></span></span><span <div class="csty-formula-item">实际销售单价不含税</div>
class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><el-input <div class="csty-formula-item">x</div>
class="formula-input-top" v-model="value.taxRateCustomer" placeholder="客户税负率"></el-input><span <div class="csty-formula-item">(</div>
class="mclose">)</span><span class="mspace" style="margin-right:0.2222em;"></span><span <div class="csty-formula-item">1</div>
class="mbin"></span><span class="mspace" style="margin-right:0.2222em;"></span></span><span <div class="csty-formula-item">-</div>
class="base"><span class="strut" style="height:0.7667em;vertical-align:-0.0833em;"></span><span <div class="csty-formula-item">
class="mord cjk_fallback">毛料加权平均单价不含税</span><span class="mspace" <template v-if="value.priceFormulaType == 'outProcessService'">
style="margin-right:0.2222em;"></span><span class="mbin">×</span><span class="mspace" <el-input
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" class="csty-formula-input"
style="height:0.7667em;vertical-align:-0.0833em;"></span><el-input class="formula-input-top" v-model="value.taxRateCustomer"
v-model="value.saleTonnage" placeholder="销售吨数"></el-input><span class="mspace" placeholder="客户税负率"
style="margin-right:0.2222em;"></span><span class="mbin"></span><span class="mspace" size="mini"
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" ></el-input>
style="height:0.6833em;"></span><span class="mord cjk_fallback">资金占用利息</span></span></span></span> </template>
<template v-else>
客户税负率
</template>
</div>
<div class="csty-formula-item">)</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">毛料加权平均单价不含税</div>
<div class="csty-formula-item">x</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'outProcessService'">
<el-input
class="csty-formula-input"
v-model="value.saleTonnage"
placeholder="销售吨数"
size="mini"
></el-input>
</template>
<template v-else>
销售吨数
</template>
</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">资金占用利息</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import katex from 'katex';
import 'katex/dist/katex.min.css';
export default { export default {
props: ['value'], props: ["value"],
components: { components: {},
},
data() { data() {
return { return {};
}
},
computed: {
},
created() {
}, },
computed: {},
created() {},
mounted() { mounted() {
this.$nextTick(function () { this.$nextTick(function() {});
// var htmlG = katex.renderToString(String.raw`
// = \times \lparen 1 - \rparen - \times -
// `, {
// throwOnError: false
// });
// console.log(htmlG)
})
}, },
methods: { methods: {}
} };
}
</script> </script>
<style scoped> <style scoped>
.formula-transit-service { .csty-formula-box {
width: 100%; width: 100%;
overflow: auto; overflow-x: auto;
font-size: 14px;
color: #606266;
padding: 15px; padding: 15px;
margin: 10px;
background-color: aliceblue;
border-radius: 5px;
} }
.csty-formula {
.formula-box { min-width: 1000px;
font: normal 1.21em KaTeX_Main, Times New Roman, serif;
width: 1500px;
padding: 30px;
} }
.csty-formula-box-x {
::v-deep .formula-input-top { display: flex;
width: 80px; flex-direction: row;
display: inline-block; align-items: center;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: -4px;
} }
.csty-formula-box-y {
::v-deep .formula-input-top .el-input__inner { display: flex;
padding: 0px 5px; flex-direction: column;
height: 20px; align-items: center;
line-height: 20px;
} }
.csty-formula-item {
::v-deep .formula-input-bottom { padding: 5px 5px;
width: 80px;
display: inline-block;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 6px;
} }
.csty-formula-item-y {
::v-deep .formula-input-bottom .el-input__inner { padding: 5px 5px;
padding: 0px 5px; width: 100%;
height: 20px;
line-height: 20px;
} }
.csty-formula-line {
::v-deep .formula-input-center { border-bottom: 1px solid #606266;
width: 80px; width: 100%;
display: inline-block; height: 0;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 0px;
} }
.csty-formula-input {
::v-deep .formula-input-center .el-input__inner { width: 110px;
padding: 0px 5px;
height: 20px;
line-height: 20px;
} }
</style> </style>

@ -1,145 +1,195 @@
<template> <template>
<div class="formula-special-price"> <div class="formula-special-price csty-formula-box">
<div class="formula-box"> <div class="csty-formula">
<div class="formula-item"><span class="katex"> <div class="csty-formula-box-x">
<span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" <div class="csty-formula-item">(</div>
style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span <div class="csty-formula-item">采购结算单价 不含税</div>
class="mord cjk_fallback">采购结算单价不含税</span><span class="mspace" <div class="csty-formula-item">x</div>
style="margin-right:0.2222em;"></span><span class="mbin">×</span><span class="mspace" <div class="csty-formula-item">(</div>
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" <div class="csty-formula-item">1</div>
style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span <div class="csty-formula-item">+</div>
class="mord">1</span><span class="mspace" style="margin-right:0.2222em;"></span><span <div class="csty-formula-item">
class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span <template v-if="value.priceFormulaType == 'specialPrice'">
class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><el-input <el-input
class="formula-input-top" v-model="value.saleTonnage" placeholder="税率"></el-input><span class="csty-formula-input"
class="mclose">)</span><span class="mspace" style="margin-right:0.2222em;"></span><span v-model="value.taxRate"
class="mbin"></span><span class="mspace" style="margin-right:0.2222em;"></span></span><span placeholder="税率"
class="base"><span class="strut" style="height:0.7667em;vertical-align:-0.0833em;"></span><el-input size="mini"
class="formula-input-top" v-model="value.saleTonnage" placeholder="固定利润1"></el-input><span ></el-input>
class="mspace" style="margin-right:0.2222em;"></span><span class="mbin"></span><span class="mspace" </template>
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" <template v-else>
style="height:0.7667em;vertical-align:-0.0833em;"></span><el-input class="formula-input-top" 税率
v-model="value.saleTonnage" placeholder="其他费用1"></el-input><span class="mspace" </template>
style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" </div>
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" <div class="csty-formula-item">)</div>
style="height:1em;vertical-align:-0.25em;"></span><el-input class="formula-input-top" <div class="csty-formula-item">-</div>
v-model="value.saleTonnage" placeholder="其他费用2"></el-input><span class="mclose">)</span><span <div class="csty-formula-item">
class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">×</span><span class="mspace" <template v-if="value.priceFormulaType == 'specialPrice'">
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" <el-input
style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="csty-formula-input"
class="mord">1</span><span class="mspace" style="margin-right:0.2222em;"></span><span v-model="value.fixedProfit1"
class="mbin"></span><span class="mspace" style="margin-right:0.2222em;"></span></span><span placeholder="固定利润1"
class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><el-input size="mini"
class="formula-input-top" v-model="value.saleTonnage" placeholder="客户税负率"></el-input><span ></el-input>
class="mclose">)</span><span class="mspace" style="margin-right:0.2222em;"></span><span </template>
class="mbin"></span><span class="mspace" style="margin-right:0.2222em;"></span></span><span <template v-else>
class="base"><span class="strut" style="height:0.7667em;vertical-align:-0.0833em;"></span><el-input 固定利润1
class="formula-input-top" v-model="value.saleTonnage" placeholder="固定利润1"></el-input><span </template>
class="mspace" style="margin-right:0.2222em;"></span><span class="mbin"></span><span class="mspace" </div>
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" <div class="csty-formula-item">-</div>
style="height:0.7667em;vertical-align:-0.0833em;"></span><el-input class="formula-input-top" <div class="csty-formula-item">
v-model="value.saleTonnage" placeholder="其他费用1"></el-input><span class="mspace" <template v-if="value.priceFormulaType == 'specialPrice'">
style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" <el-input
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" class="csty-formula-input"
style="height:0.6833em;"></span><el-input class="formula-input-top" v-model="value.saleTonnage" v-model="value.otherCost1"
placeholder="其他费用2"></el-input><span class="mspace" style="margin-right:0.2778em;"></span><span placeholder="其他费用1"
class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span size="mini"
class="base"><span class="strut" style="height:0.6833em;"></span><span ></el-input>
class="mord cjk_fallback">采购单价含税</span></span></span></span></div> </template>
<div class="formula-item">实际销售单价 = 客户结算单单价</div> <template v-else>
其他费用1
</template>
</div>
<div class="csty-formula-item">+</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'specialPrice'">
<el-input
class="csty-formula-input"
v-model="value.otherCost2"
placeholder="其他费用2"
size="mini"
></el-input>
</template>
<template v-else>
其他费用2
</template>
</div>
<div class="csty-formula-item">)</div>
<div class="csty-formula-item">x</div>
<div class="csty-formula-item">(</div>
<div class="csty-formula-item">1</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'specialPrice'">
<el-input
class="csty-formula-input"
v-model="value.taxRateCustomer"
placeholder="客户税负率"
size="mini"
></el-input>
</template>
<template v-else>
客户税负率
</template>
</div>
<div class="csty-formula-item">)</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'specialPrice'">
<el-input
class="csty-formula-input"
v-model="value.fixedProfit1"
placeholder="固定利润1"
size="mini"
></el-input>
</template>
<template v-else>
固定利润1
</template>
</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'specialPrice'">
<el-input
class="csty-formula-input"
v-model="value.otherCost1"
placeholder="其他费用1"
size="mini"
></el-input>
</template>
<template v-else>
其他费用1
</template>
</div>
<div class="csty-formula-item">+</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'specialPrice'">
<el-input
class="csty-formula-input"
v-model="value.otherCost2"
placeholder="其他费用2"
size="mini"
></el-input>
</template>
<template v-else>
其他费用2
</template>
</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">采购单价含税</div>
</div>
<div class="csty-formula-box-x">
<div class="csty-formula-item">实际销售单价</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">客户结算单单价</div>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import katex from 'katex';
import 'katex/dist/katex.min.css';
export default { export default {
props: ['value'], props: ["value"],
components: { components: {},
},
data() { data() {
return { return {};
}
},
computed: {
},
created() {
}, },
computed: {},
created() {},
mounted() { mounted() {
this.$nextTick(function () { this.$nextTick(function() {});
var htmlH = katex.renderToString(String.raw`
\lparen 采购结算单价不含税 \times \lparen 1 + 税率 \rparen - 固定利润1 - 其他费用1 + 其他费用2 \rparen \times \lparen 1 - 客户税负率 \rparen - 固定利润1 - 其他费用1 + 其他费用2
= 采购单价含税
`, {
throwOnError: false
});
console.log(htmlH)
})
}, },
methods: { methods: {}
} };
}
</script> </script>
<style scoped> <style scoped>
.formula-special-price { .csty-formula-box {
width: 100%; width: 100%;
overflow: auto; overflow-x: auto;
font-size: 14px;
color: #606266;
padding: 15px; padding: 15px;
margin: 10px;
background-color: aliceblue;
border-radius: 5px;
} }
.csty-formula {
.formula-box { min-width: 1600px;
font: normal 1.21em KaTeX_Main, Times New Roman, serif;
width: 1700px;
padding: 30px;
} }
.csty-formula-box-x {
::v-deep .formula-input-top { display: flex;
width: 80px; flex-direction: row;
display: inline-block; align-items: center;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: -4px;
} }
.csty-formula-box-y {
::v-deep .formula-input-top .el-input__inner { display: flex;
padding: 0px 5px; flex-direction: column;
height: 20px; align-items: center;
line-height: 20px;
} }
.csty-formula-item {
::v-deep .formula-input-bottom { padding: 5px 5px;
width: 80px;
display: inline-block;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 6px;
} }
.csty-formula-item-y {
::v-deep .formula-input-bottom .el-input__inner { padding: 5px 5px;
padding: 0px 5px; width: 100%;
height: 20px;
line-height: 20px;
} }
.csty-formula-line {
::v-deep .formula-input-center { border-bottom: 1px solid #606266;
width: 80px; width: 100%;
display: inline-block; height: 0;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 0px;
} }
.csty-formula-input {
::v-deep .formula-input-center .el-input__inner { width: 110px;
padding: 0px 5px;
height: 20px;
line-height: 20px;
} }
</style> </style>

@ -1,204 +1,206 @@
<template> <template>
<div class="formula-storage-service"> <div>
<div class="formula-box"> <div class="formula-storage-service csty-formula-box">
<div class="formula-item"> <div class="csty-formula">
<span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" <div class="csty-formula-box-x">
style="height:0.6833em;"></span><span class="mord cjk_fallback">垫付采购金额</span><span class="mspace" <div class="csty-formula-item">垫付采购金额</div>
style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" <div class="csty-formula-item">=</div>
style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" <div class="csty-formula-item">(</div>
style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span <div class="csty-formula-item">客户开标价上标段</div>
class="mord cjk_fallback">客户开标价上标段</span><span class="mspace" <div class="csty-formula-item">-</div>
style="margin-right:0.2222em;"></span><span class="mbin"></span><span class="mspace" <div class="csty-formula-item">
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" <template v-if="value.priceFormulaType == 'storageService'">
style="height:1em;vertical-align:-0.25em;"></span><span class="mord cjk_fallback"><el-input <el-input
class="formula-input-center" v-model="value.fixedAmount" placeholder="固定金额"></el-input></span><span class="csty-formula-input"
class="mclose">)</span><span class="mspace" style="margin-right:0.2222em;"></span><span v-model="value.fixedAmount"
class="mbin">×</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span placeholder="固定金额"
class="base"><span class="strut" style="height:0.6833em;"></span><span size="mini"
class="mord cjk_fallback">吨数</span></span></span></span> ></el-input>
</div> </template>
<div class="formula-item"> <template v-else>
<span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" 固定金额
style="height:0.6833em;"></span><span class="mord cjk_fallback">实际销售单价</span><span class="mspace" </template>
style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" </div>
style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" <div class="csty-formula-item">)</div>
style="height:0.6833em;"></span><span class="mord cjk_fallback">客户开标价售卖标段</span></span></span></span> <div class="csty-formula-item">x</div>
</div> <div class="csty-formula-item">吨数</div>
<div class="formula-item"> </div>
<span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" <div class="csty-formula-box-x">
style="height:0.6833em;"></span><span class="mord cjk_fallback">资金利息</span><span class="mspace" <div class="csty-formula-item">实际销售单价</div>
style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" <div class="csty-formula-item">=</div>
style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" <div class="csty-formula-item">客户开标价售卖标段</div>
style="height:0.7667em;vertical-align:-0.0833em;"></span><span </div>
class="mord cjk_fallback">垫付采购金额</span><span class="mspace" style="margin-right:0.2222em;"></span><span <div class="csty-formula-box-x">
class="mbin">×</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span <div class="csty-formula-item">资金利息</div>
class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span <div class="csty-formula-item">=</div>
class="mopen">(</span><span class="mord">1</span><span class="mspace" <div class="csty-formula-item">垫付采购金额</div>
style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" <div class="csty-formula-item">x</div>
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" <div class="csty-formula-item">(</div>
style="height:1em;vertical-align:-0.25em;"></span><span class="mord cjk_fallback"><el-input <div class="csty-formula-item">1</div>
class="formula-input-center" v-model="value.fundRate" placeholder="利率"></el-input></span><span <div class="csty-formula-item">+</div>
class="mclose">)</span></span></span></span> <div class="csty-formula-item">
</div> <template v-if="value.priceFormulaType == 'storageService'">
<div class="formula-item"> <el-input
<span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" class="csty-formula-input"
style="height:0.6833em;"></span><span class="mord cjk_fallback">利润金额</span><span class="mspace" v-model="value.fundRate"
style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" placeholder="利率"
style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" size="mini"
style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span ></el-input>
class="mord cjk_fallback"><el-input class="formula-input-center" v-model="value.accountCost" </template>
placeholder="户头费"></el-input></span><span class="mspace" style="margin-right:0.2222em;"></span><span <template v-else>
class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span 利率
class="base"><span class="strut" style="height:0.7667em;vertical-align:-0.0833em;"></span> </template>
<el-input class="formula-input-center" v-model="value.handleCost" placeholder="装卸费"></el-input><span </div>
class="mspace" style="margin-right:0.2222em;"></span><span class="mbin"></span><span class="mspace" <div class="csty-formula-item">)</div>
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" </div>
style="height:0.7667em;vertical-align:-0.0833em;"></span><el-input class="formula-input-center" <div class="csty-formula-box-x">
v-model="value.fixedProfit1" placeholder="固定利润1"></el-input> <div class="csty-formula-item">利润金额</div>
<span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin"></span><span class="mspace" <div class="csty-formula-item">=</div>
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" <div class="csty-formula-item">(</div>
style="height:0.7667em;vertical-align:-0.0833em;"></span><el-input class="formula-input-center" <div class="csty-formula-item">
v-model="value.otherCost1" placeholder="其它费用1"></el-input><span class="mspace" <template v-if="value.priceFormulaType == 'storageService'">
style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" <el-input
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" class="csty-formula-input"
style="height:1em;vertical-align:-0.25em;"></span><el-input class="formula-input-center" v-model="value.accountCost"
v-model="value.otherCost2" placeholder="其它费用2"></el-input><span class="mclose">)</span><span placeholder="户头费"
class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">×</span><span class="mspace" size="mini"
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" ></el-input>
style="height:0.7667em;vertical-align:-0.0833em;"></span><span class="mord cjk_fallback">吨数</span><span </template>
class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" <template v-else>
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" 户头费
style="height:0.6833em;"></span><span class="mord cjk_fallback">资金利息</span></span></span></span> </template>
</div> </div>
<div class="formula-item"> <div class="csty-formula-item">+</div>
<span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" <div class="csty-formula-item">
style="height:0.6833em;"></span><span class="mord cjk_fallback">补交采购金额</span><span class="mspace" <template v-if="value.priceFormulaType == 'storageService'">
style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" <el-input
style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" class="csty-formula-input"
style="height:0.7667em;vertical-align:-0.0833em;"></span><span v-model="value.handleCost"
class="mord cjk_fallback">客户开标价售卖标段</span><span class="mspace" placeholder="装卸费"
style="margin-right:0.2222em;"></span><span class="mbin">×</span><span class="mspace" size="mini"
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" ></el-input>
style="height:0.7667em;vertical-align:-0.0833em;"></span><span class="mord cjk_fallback">吨数</span><span </template>
class="mspace" style="margin-right:0.2222em;"></span><span class="mbin"></span><span class="mspace" <template v-else>
style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" 装卸费
style="height:0.7667em;vertical-align:-0.0833em;"></span><span </template>
class="mord cjk_fallback">利润金额</span><span class="mspace" style="margin-right:0.2222em;"></span><span </div>
class="mbin"></span><span class="mspace" style="margin-right:0.2222em;"></span></span><span <div class="csty-formula-item">-</div>
class="base"><span class="strut" style="height:0.6833em;"></span><span <div class="csty-formula-item">
class="mord cjk_fallback">垫付采购金额</span></span></span></span> <template v-if="value.priceFormulaType == 'storageService'">
<el-input
class="csty-formula-input"
v-model="value.fixedProfit1"
placeholder="固定利润1"
size="mini"
></el-input>
</template>
<template v-else>
固定利润1
</template>
</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'storageService'">
<el-input
class="csty-formula-input"
v-model="value.otherCost1"
placeholder="其它费用1"
size="mini"
></el-input>
</template>
<template v-else>
其它费用1
</template>
</div>
<div class="csty-formula-item">+</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'storageService'">
<el-input
class="csty-formula-input"
v-model="value.otherCost2"
placeholder="其它费用2"
size="mini"
></el-input>
</template>
<template v-else>
其它费用2
</template>
</div>
<div class="csty-formula-item">)</div>
<div class="csty-formula-item">x</div>
<div class="csty-formula-item">吨数</div>
<div class="csty-formula-item">+</div>
<div class="csty-formula-item">资金利息</div>
</div>
<div class="csty-formula-box-x">
<div class="csty-formula-item">补交采购金额</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">客户开标价售卖标段</div>
<div class="csty-formula-item">x</div>
<div class="csty-formula-item">吨数</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">利润金额</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">垫付采购金额</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import katex from 'katex';
import 'katex/dist/katex.min.css';
export default { export default {
props: ['value'], props: ["value"],
components: { components: {},
},
data() { data() {
return { return {};
}
},
computed: {
},
created() {
}, },
computed: {},
created() {},
mounted() { mounted() {
this.$nextTick(function () { this.$nextTick(function() {});
// var htmlE1 = katex.renderToString(String.raw`
// = \lparen - \rparen \times
// `, {
// throwOnError: false
// })
// var htmlE2 = katex.renderToString(String.raw`
// =
// `, {
// throwOnError: false
// })
// var htmlE3 = katex.renderToString(String.raw`
// = \times \lparen 1 + \rparen
// `, {
// throwOnError: false
// })
// var htmlE4 = katex.renderToString(String.raw`
// = \lparen + - 1 - 1 + 2 \rparen \times +
// `, {
// throwOnError: false
// })
// var htmlE5 = katex.renderToString(String.raw`
// = \times - -
// `, {
// throwOnError: false
// })
// console.log(htmlE5)
})
}, },
methods: { methods: {}
} };
}
</script> </script>
<style scoped> <style scoped>
.formula-storage-service { .csty-formula-box {
width: 100%; width: 100%;
overflow: auto; overflow-x: auto;
font-size: 14px;
color: #606266;
padding: 15px; padding: 15px;
margin: 10px;
background-color: aliceblue;
border-radius: 5px;
} }
.csty-formula {
.formula-box { min-width: 1000px;
width: 1500px;
padding: 30px;
} }
.csty-formula-box-x {
::v-deep .formula-input-top { display: flex;
width: 80px; flex-direction: row;
display: inline-block; align-items: center;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: -4px;
} }
.csty-formula-box-y {
::v-deep .formula-input-top .el-input__inner { display: flex;
padding: 0px 5px; flex-direction: column;
height: 20px; align-items: center;
line-height: 20px;
} }
.csty-formula-item {
::v-deep .formula-input-bottom { padding: 5px 5px;
width: 80px;
display: inline-block;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 6px;
} }
.csty-formula-item-y {
::v-deep .formula-input-bottom .el-input__inner { padding: 5px 5px;
padding: 0px 5px; width: 100%;
height: 20px;
line-height: 20px;
} }
.csty-formula-line {
::v-deep .formula-input-center { border-bottom: 1px solid #606266;
width: 80px; width: 100%;
display: inline-block; height: 0;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 0px;
} }
.csty-formula-input {
::v-deep .formula-input-center .el-input__inner { width: 110px;
padding: 0px 5px;
height: 20px;
line-height: 20px;
} }
</style> </style>

@ -1,198 +1,238 @@
<template> <template>
<div class="formula-tax-rate-a"> <div class="formula-tax-rate-a csty-formula-box">
<div class="formula-box"> <div class="csty-formula">
<div class="formula-item"> <div class="csty-formula-box-x">
<span class="katex"> <div class="csty-formula-box-y">
<span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" <div class="csty-formula-box-x">
style="height:2.2442em;vertical-align:-0.52em;"></span><span class="mord"><span <div class="csty-formula-box-y">
class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span <div class="csty-formula-box-x">
class="vlist-r"><span class="vlist" style="height:1.7242em;"><span style="top:-2.8284em;"><span <div class="csty-formula-box-y">
class="pstrut" style="height:3.1734em;"></span><span <div class="csty-formula-box-x">
class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span <div class="csty-formula-item">
class="mopen mtight">(</span><span class="mord mtight">1</span><el-input 客户销售结算金额含税价
class="formula-input-bottom" v-model="value.taxRateInvoicingCompany" </div>
placeholder="开票公司税负率" style="width: 120px;"></el-input><span </div>
class="mclose mtight">)</span></span></span></span><span style="top:-3.4034em;"><span <div class="csty-formula-line"></div>
class="pstrut" style="height:3.1734em;"></span><span class="frac-line" <div class="csty-formula-box-x">
style="border-bottom-width:0.04em;"></span></span><span style="top:-3.7242em;"><span <div class="csty-formula-item">(</div>
class="pstrut" style="height:3.1734em;"></span><span <div class="csty-formula-item">1</div>
class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span <div class="csty-formula-item">+</div>
class="mord mtight"><span <div class="csty-formula-item">
class="mopen nulldelimiter sizing reset-size3 size6"></span><span class="mfrac"><span <template v-if="value.priceFormulaType == 'taxRateA'">
class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" <el-input
style="height:1.6762em;"><span style="top:-2.656em;"><span class="pstrut" class="csty-formula-input"
style="height:3em;"></span><span v-model="value.taxRate"
class="sizing reset-size3 size1 mtight"><span class="mord mtight"><span placeholder="税率"
class="mord cjk_fallback mtight"><el-input class="formula-input-bottom" size="mini"
v-model="value.settlementTonnage" ></el-input>
placeholder="结算吨数"></el-input></span></span></span></span><span </template>
style="top:-3.2255em;"><span class="pstrut" style="height:3em;"></span><span <template v-else>
class="frac-line mtight" 税率
style="border-bottom-width:0.049em;"></span></span><span </template>
style="top:-3.9117em;"><span class="pstrut" style="height:3em;"></span><span </div>
class="sizing reset-size3 size1 mtight"><span class="mord mtight"><span <div class="csty-formula-item">)</div>
class="mord mtight"><span </div>
class="mopen nulldelimiter sizing reset-size1 size6"></span><span </div>
class="mfrac"><span class="vlist-t vlist-t2"><span <div class="csty-formula-item">=</div>
class="vlist-r"><span class="vlist" style="height:1.0703em;"><span <div class="csty-formula-item">
style="top:-2.4265em;"><span class="pstrut" 客户销售结算金额不含税价
style="height:3em;"></span><span class="mord mtight"><span </div>
class="mopen mtight">(</span><span <div class="csty-formula-item">-</div>
class="mord mtight">1</span><span <div class="csty-formula-item">
class="mbin mtight">+</span><el-input <template v-if="value.priceFormulaType == 'taxRateA'">
class="formula-input-bottom" v-model="value.taxRate" <el-input
placeholder="税率" style="top:4"></el-input><span class="csty-formula-input"
class="mclose mtight">)</span></span></span><span v-model="value.fixedProfit1"
style="top:-3.2255em;"><span class="pstrut" placeholder="固定利润1"
style="height:3em;"></span><span class="frac-line mtight" size="mini"
style="border-bottom-width:0.049em;"></span></span><span ></el-input>
style="top:-3.387em;"><span class="pstrut" </template>
style="height:3em;"></span><span class="mord mtight"><span <template v-else>
class="mord cjk_fallback mtight">客户销售结算金额含税价</span></span></span></span><span 固定利润1
class="vlist-s"></span></span><span class="vlist-r"><span </template>
class="vlist" </div>
style="height:0.8235em;"><span></span></span></span></span></span><span <div class="csty-formula-item">-</div>
class="mclose nulldelimiter sizing reset-size1 size6"></span></span><span <div class="csty-formula-item">
class="mrel mtight">=</span><span <template v-if="value.priceFormulaType == 'taxRateA'">
class="mord cjk_fallback mtight">客户销售结算金额不含税价</span><span <el-input
class="mbin mtight"></span><el-input class="formula-input-center" class="csty-formula-input"
v-model="value.fixedProfit1" placeholder="固定利润1"></el-input><span v-model="value.otherCost1"
class="mbin mtight"></span><el-input class="formula-input-center" placeholder="其他费用2"
v-model="value.otherCost1" placeholder="其他费用1"></el-input><span size="mini"
class="mbin mtight">+</span><el-input class="formula-input-center" ></el-input>
v-model="value.otherCost2" </template>
placeholder="其他费用2"></el-input></span></span></span></span><span <template v-else>
class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" 其他费用2
style="height:0.344em;"><span></span></span></span></span></span><span </template>
class="mclose nulldelimiter sizing reset-size3 size6"></span></span><span </div>
class="mrel mtight">=</span><span <div class="csty-formula-item">+</div>
class="mord cjk_fallback mtight">理论销售结算单价不含税</span><span <div class="csty-formula-item">
class="mbin mtight">×</span><span class="mopen mtight">(</span><span <template v-if="value.priceFormulaType == 'taxRateA'">
class="mord mtight">1</span><span class="mbin mtight">+</span><el-input <el-input
class="formula-input-center" v-model="value.taxRate" placeholder="税率"></el-input><span class="csty-formula-input"
class="mclose mtight">)</span><span class="mrel mtight">=</span><span v-model="value.otherCost2"
class="mord cjk_fallback mtight">理论销售结算单价含税</span><span placeholder="其他费用1"
class="mbin mtight">×</span><span class="mopen mtight">(</span><span size="mini"
class="mord mtight">1</span><span class="mbin mtight"></span><el-input ></el-input>
class="formula-input-center" v-model="value.taxRateYellowBull" </template>
placeholder="黄牛税负率"></el-input><span class="mbin mtight"></span><el-input <template v-else>
class="formula-input-center" v-model="value.fundRate" 其他费用1
placeholder="资金利率"></el-input><span class="mclose mtight">)</span><span </template>
class="mrel mtight">=</span><span </div>
class="mord cjk_fallback mtight">黄牛结算价</span></span></span></span></span><span </div>
class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" <div class="csty-formula-line"></div>
style="height:0.52em;"><span></span></span></span></span></span><span <div class="csty-formula-item">
class="mclose nulldelimiter"></span></span><span class="mspace" <template v-if="value.priceFormulaType == 'taxRateA'">
style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" <el-input
style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" class="csty-formula-input"
style="height:0.6833em;"></span><span class="mord cjk_fallback">采购单价含税</span></span></span></span> v-model="value.settlementTonnage"
placeholder="结算吨数"
size="mini"
></el-input>
</template>
<template v-else>
结算吨数
</template>
</div>
</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">理论销售结算单价不含税</div>
<div class="csty-formula-item">x</div>
<div class="csty-formula-item">(</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'taxRateA'">
<el-input
class="csty-formula-input"
v-model="value.taxRate"
placeholder="税率"
size="mini"
></el-input>
</template>
<template v-else>
税率
</template>
</div>
<div class="csty-formula-item">)</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">理论销售结算单价含税</div>
<div class="csty-formula-item">x</div>
<div class="csty-formula-item">(</div>
<div class="csty-formula-item">1</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'taxRateA'">
<el-input
class="csty-formula-input"
v-model="value.taxRateYellowBull"
placeholder="黄牛税负率"
size="mini"
></el-input>
</template>
<template v-else>
黄牛税负率
</template>
</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'taxRateA'">
<el-input
class="csty-formula-input"
v-model="value.fundRate"
placeholder="资金利率"
size="mini"
></el-input>
</template>
<template v-else>
资金利率
</template>
</div>
<div class="csty-formula-item">)</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">黄牛结算价</div>
</div>
<div class="csty-formula-line"></div>
<div class="csty-formula-box-x">
<div class="csty-formula-item">(</div>
<div class="csty-formula-item">1</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'taxRateA'">
<el-input
class="csty-formula-input"
v-model="value.taxRateInvoicingCompany"
placeholder="开票公司税负率"
size="mini"
></el-input>
</template>
<template v-else>
开票公司税负率
</template>
</div>
<div class="csty-formula-item">)</div>
</div>
</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">采购单价含税</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import katex from 'katex'; import katex from "katex";
import 'katex/dist/katex.min.css'; import "katex/dist/katex.min.css";
export default { export default {
props: ['value'], props: ["value"],
components: { components: {},
},
data() { data() {
return { return {};
}
},
computed: {
},
created() {
}, },
computed: {},
created() {},
mounted() { mounted() {
this.$nextTick(function () { this.$nextTick(function() {});
// var htmlB = katex.renderToString(String.raw`
// \frac {\frac {\frac { } {\lparen 1 + \boxed{} \rparen }
// = - \boxed{1} - \boxed{1} + \boxed{2}} {\boxed{}}
// = \times \lparen 1 + \rparen
// = \times \lparen 1 - \boxed{} - \boxed{} \rparen
// = }{ \lparen 1 \boxed{} \rparen }
// =
// `, {
// throwOnError: false
// });
// var htmlB = katex.renderToString(String.raw`
// \frac {\frac {\frac { } {\lparen 1 + \rparen }
// = - 1 - 1 + 2} {}
// = \times \lparen 1 + \rparen
// = \times \lparen 1 - - \rparen
// = }{ \lparen 1 \rparen }
// =
// `, {
// throwOnError: false
// });
// console.log(htmlB)
})
}, },
methods: { methods: {}
} };
}
</script> </script>
<style scoped> <style scoped>
.formula-tax-rate-a { .csty-formula-box {
width: 100%; width: 100%;
overflow: auto; overflow-x: auto;
font-size: 14px;
color: #606266;
padding: 15px; padding: 15px;
margin: 10px;
background-color: aliceblue;
border-radius: 5px;
} }
.csty-formula {
.formula-box { min-width: 2000px;
width: 1700px;
padding: 30px;
} }
.csty-formula-box-x {
::v-deep .formula-input-top { display: flex;
width: 80px; flex-direction: row;
display: inline-block; align-items: center;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: -4px;
} }
.csty-formula-box-y {
::v-deep .formula-input-top .el-input__inner { display: flex;
padding: 0px 5px; flex-direction: column;
height: 20px; align-items: center;
line-height: 20px;
} }
.csty-formula-item {
::v-deep .formula-input-bottom { padding: 5px 5px;
width: 80px;
display: inline-block;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 6px;
} }
.csty-formula-item-y {
::v-deep .formula-input-bottom .el-input__inner { padding: 5px 5px;
padding: 0px 5px; width: 100%;
height: 20px;
line-height: 20px;
} }
.csty-formula-line {
::v-deep .formula-input-center { border-bottom: 1px solid #606266;
width: 80px; width: 100%;
display: inline-block; height: 0;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 0px;
} }
.csty-formula-input {
::v-deep .formula-input-center .el-input__inner { width: 110px;
padding: 0px 5px;
height: 20px;
line-height: 20px;
} }
</style> </style>

@ -1,142 +1,170 @@
<template> <template>
<div class="formula-tax-rate-b"> <div class="formula-tax-rate-b csty-formula-box">
<div class="formula-box"> <div class="csty-formula">
<div class="formula-item"><span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span <div class="csty-formula-box-x">
class="strut" style="height:1.53em;vertical-align:-0.52em;"></span><span class="mord"><span <div class="csty-formula-box-y">
class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span <div class="csty-formula-box-x">
class="vlist-r"><span class="vlist" style="height:1.01em;"><span style="top:-2.655em;"><span <div class="csty-formula-item">黄牛结算价</div>
class="pstrut" style="height:3em;"></span><span <div class="csty-formula-item">=</div>
class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span <div class="csty-formula-item">理论销售结算单价含税</div>
class="mopen mtight">(</span><span class="mord mtight">1</span><span <div class="csty-formula-item">x</div>
class="mbin mtight"></span><el-input class="formula-input-bottom" <div class="csty-formula-item">(</div>
v-model="value.taxRateInvoicingCompany" placeholder="开票公司税负率" <div class="csty-formula-item">1</div>
style="width: 120px;"></el-input><span <div class="csty-formula-item">-</div>
class="mclose mtight">)</span></span></span></span><span style="top:-3.23em;"><span <div class="csty-formula-item">
class="pstrut" style="height:3em;"></span><span class="frac-line" <template v-if="value.priceFormulaType == 'taxRateB'">
style="border-bottom-width:0.04em;"></span></span><span style="top:-3.485em;"><span <el-input
class="pstrut" style="height:3em;"></span><span class="csty-formula-input"
class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span v-model="value.taxRateYellowBull"
class="mord cjk_fallback mtight">黄牛结算价</span><span class="mrel mtight">=</span><span placeholder="黄牛税负率"
class="mord cjk_fallback mtight">理论销售结算单价含税</span><span size="mini"
class="mbin mtight">×</span><span class="mopen mtight">(</span><span ></el-input>
class="mord mtight">1</span><span class="mbin mtight"></span><el-input </template>
class="formula-input-top" v-model="value.taxRateYellowBull" <template v-else>
placeholder="黄牛税负率"></el-input><span class="mbin mtight"></span><el-input 黄牛税负率
class="formula-input-top" v-model="value.fundRate" placeholder="资金利率"></el-input><span </template>
class="mclose mtight">)</span><span class="mbin mtight"></span><el-input </div>
class="formula-input-top" v-model="value.fixedProfit1" <div class="csty-formula-item">-</div>
placeholder="固定利润1"></el-input><span class="mbin mtight"></span><el-input <div class="csty-formula-item">
class="formula-input-top" v-model="value.otherCost1" <template v-if="value.priceFormulaType == 'taxRateB'">
placeholder="其他费用1"></el-input><span class="mbin mtight">+</span><el-input <el-input
class="formula-input-top" v-model="value.otherCost2" class="csty-formula-input"
placeholder="其他费用2"></el-input></span></span></span></span><span v-model="value.fundRate"
class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" placeholder="资金利率"
style="height:0.52em;"><span></span></span></span></span></span><span size="mini"
class="mclose nulldelimiter"></span></span><span class="mspace" ></el-input>
style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" </template>
style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" <template v-else>
style="height:0.6833em;"></span><span class="mord cjk_fallback">采购单价含税</span></span></span></span> 资金利率
</template>
</div>
<div class="csty-formula-item">)</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'taxRateB'">
<el-input
class="csty-formula-input"
v-model="value.fixedProfit1"
placeholder="固定利润1"
size="mini"
></el-input>
</template>
<template v-else>
固定利润1
</template>
</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'taxRateB'">
<el-input
class="csty-formula-input"
v-model="value.otherCost1"
placeholder="其他费用1"
size="mini"
></el-input>
</template>
<template v-else>
其他费用1
</template>
</div>
<div class="csty-formula-item">+</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'taxRateB'">
<el-input
class="csty-formula-input"
v-model="value.otherCost2"
placeholder="其他费用2"
size="mini"
></el-input>
</template>
<template v-else>
其他费用2
</template>
</div>
</div>
<div class="csty-formula-line"></div>
<div class="csty-formula-box-x">
<div class="csty-formula-item"></div>
<div class="csty-formula-item">1</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'taxRateB'">
<el-input
class="csty-formula-input"
v-model="value.taxRateInvoicingCompany"
placeholder="开票公司税负率"
size="mini"
></el-input>
</template>
<template v-else>
开票公司税负率
</template>
</div>
<div class="csty-formula-item"></div>
</div>
</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">采购单价含税</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import katex from 'katex'; import katex from "katex";
import 'katex/dist/katex.min.css'; import "katex/dist/katex.min.css";
export default { export default {
props: ['value'], props: ["value"],
components: { components: {},
},
data() { data() {
return { return {};
}
},
computed: {
},
created() {
}, },
computed: {},
created() {},
mounted() { mounted() {
this.$nextTick(function () { this.$nextTick(function() {});
// var htmlC = katex.renderToString(String.raw`
// \frac {
// = \times \lparen 1 - \boxed{} - \boxed{} \rparen - \boxed{1} - \boxed{1} + \boxed{2} } { \lparen 1 -\boxed{ } \rparen}
// =
// `, {
// throwOnError: false
// });
// var htmlC = katex.renderToString(String.raw`
// \frac {
// = \times \lparen 1 - - \rparen - 1 - 1 + 2 } { \lparen 1 - \rparen}
// =
// `, {
// throwOnError: false
// });
// console.log(htmlC)
})
}, },
methods: { methods: {}
} };
}
</script> </script>
<style scoped> <style scoped>
.formula-tax-rate-b { .csty-formula-box {
width: 100%; width: 100%;
overflow: auto; overflow-x: auto;
font-size: 14px;
color: #606266;
padding: 15px; padding: 15px;
margin: 10px;
background-color: aliceblue;
border-radius: 5px;
} }
.csty-formula {
.formula-box { min-width: 1200px;
width: 1500px;
padding: 30px;
} }
.csty-formula-box-x {
::v-deep .formula-input-top { display: flex;
width: 80px; flex-direction: row;
display: inline-block; align-items: center;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: -4px;
} }
.csty-formula-box-y {
::v-deep .formula-input-top .el-input__inner { display: flex;
padding: 0px 5px; flex-direction: column;
height: 20px; align-items: center;
line-height: 20px;
} }
.csty-formula-item {
::v-deep .formula-input-bottom { padding: 5px 5px;
width: 80px;
display: inline-block;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 6px;
} }
.csty-formula-item-y {
::v-deep .formula-input-bottom .el-input__inner { padding: 5px 5px;
padding: 0px 5px; width: 100%;
height: 20px;
line-height: 20px;
} }
.csty-formula-line {
::v-deep .formula-input-center { border-bottom: 1px solid #606266;
width: 80px; width: 100%;
display: inline-block; height: 0;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 0px;
} }
.csty-formula-input {
::v-deep .formula-input-center .el-input__inner { width: 110px;
padding: 0px 5px;
height: 20px;
line-height: 20px;
} }
</style> </style>

@ -1,147 +1,180 @@
<template> <template>
<div class="formula-transit-service"> <div class="formula-transit-service csty-formula-box">
<div class="formula-box"> <div class="csty-formula">
<div class="formula-item"> <div class="csty-formula-box-x">
垫付采购单价含税 = 市场价含税 <div class="csty-formula-item">垫付采购单价含税</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">市场价含税</div>
</div> </div>
<div class="formula-item"> <div class="csty-formula-box-x">
实际销售单价含税 = 实际客户价含税 <div class="csty-formula-item">实际销售单价含税</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">实际客户价含税</div>
</div> </div>
<div class="formula-item"> <div class="csty-formula-box-x">
<span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" <div class="csty-formula-box-y">
style="height:1.53em;vertical-align:-0.52em;"></span><span class="mord"><span <div class="csty-formula-box-x">
class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span <div class="csty-formula-item">黄牛结算单价</div>
class="vlist-r"><span class="vlist" style="height:1.01em;"><span style="top:-2.655em;"><span <div class="csty-formula-item">=</div>
class="pstrut" style="height:3em;"></span><span <div class="csty-formula-item">实际销售单价含税</div>
class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span <div class="csty-formula-item">x</div>
class="mopen mtight">(</span><span class="mord mtight">1</span><span <div class="csty-formula-item">(</div>
class="mbin mtight"></span><el-input class="formula-input-bottom" <div class="csty-formula-item">1</div>
v-model="value.otherCost2" placeholder="开票公司税负率" style="width: 120px;"></el-input><span <div class="csty-formula-item">-</div>
class="mclose mtight">)</span></span></span></span><span style="top:-3.23em;"><span <div class="csty-formula-item">
class="pstrut" style="height:3em;"></span><span class="frac-line" <template v-if="value.priceFormulaType == 'transitService'">
style="border-bottom-width:0.04em;"></span></span><span style="top:-3.485em;"><span <el-input
class="pstrut" style="height:3em;"></span><span class="csty-formula-input"
class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span v-model="value.taxRateYellowBull"
class="mord cjk_fallback mtight">黄牛结算单价</span><span class="mrel mtight">=</span><span placeholder="黄牛税负率"
class="mord cjk_fallback mtight">实际销售单价含税</span><span size="mini"
class="mbin mtight">×</span><span class="mopen mtight">(</span><span ></el-input>
class="mord mtight">1</span><span class="mbin mtight"></span><el-input </template>
class="formula-input-top" v-model="value.otherCost2" <template v-else>
placeholder="黄牛税负率"></el-input><span class="mclose mtight">)</span><span 黄牛税负率
class="mbin mtight"></span><el-input class="formula-input-top" </template>
v-model="value.otherCost2" placeholder="倒运费"></el-input><span </div>
class="mbin mtight"></span><el-input class="formula-input-top" <div class="csty-formula-item">)</div>
v-model="value.otherCost2" placeholder="固定利润1"></el-input><span <div class="csty-formula-item">-</div>
class="mbin mtight"></span><el-input class="formula-input-top" <div class="csty-formula-item">
v-model="value.otherCost2" placeholder="其他费用1"></el-input><span <template v-if="value.priceFormulaType == 'transitService'">
class="mbin mtight">+</span><el-input class="formula-input-top" <el-input
v-model="value.otherCost2" class="csty-formula-input"
placeholder="其他费用2"></el-input></span></span></span></span><span v-model="value.reshipmentCost"
class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" placeholder="倒运费"
style="height:0.52em;"><span></span></span></span></span></span><span size="mini"
class="mclose nulldelimiter"></span></span><span class="mspace" ></el-input>
style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" </template>
style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" <template v-else>
style="height:0.6833em;"></span><span class="mord cjk_fallback">实际采购单价含税</span><span class="mspace" 倒运费
style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" </template>
style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" </div>
style="height:0.6833em;"></span><span class="mord cjk_fallback">开票公司结算价含税</span></span></span></span> <div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'transitService'">
<el-input
class="csty-formula-input"
v-model="value.fixedProfit1"
placeholder="固定利润1"
size="mini"
></el-input>
</template>
<template v-else>
固定利润1
</template>
</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'transitService'">
<el-input
class="csty-formula-input"
v-model="value.otherCost1"
placeholder="其他费用1"
size="mini"
></el-input>
</template>
<template v-else>
其他费用1
</template>
</div>
<div class="csty-formula-item">+</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'transitService'">
<el-input
class="csty-formula-input"
v-model="value.otherCost2"
placeholder="其他费用2"
size="mini"
></el-input>
</template>
<template v-else>
其他费用2
</template>
</div>
</div>
<div class="csty-formula-line"></div>
<div class="csty-formula-box-x">
<div class="csty-formula-item">(</div>
<div class="csty-formula-item">1</div>
<div class="csty-formula-item">-</div>
<div class="csty-formula-item">
<template v-if="value.priceFormulaType == 'transitService'">
<el-input
class="csty-formula-input"
v-model="value.taxRateInvoicingCompany"
placeholder="开票公司税负率"
size="mini"
></el-input>
</template>
<template v-else>
开票公司税负率
</template>
</div>
<div class="csty-formula-item">)</div>
</div>
</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">实际采购单价含税</div>
<div class="csty-formula-item">=</div>
<div class="csty-formula-item">开票公司结算价含税</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import katex from 'katex';
import 'katex/dist/katex.min.css';
export default { export default {
props: ['value'], props: ["value"],
components: { components: {},
},
data() { data() {
return { return {};
}
},
computed: {
},
created() {
}, },
computed: {},
created() {},
mounted() { mounted() {
this.$nextTick(function () { this.$nextTick(function() {});
// var htmlF = katex.renderToString(String.raw`
// \frac {
// = \times \lparen 1 - \rparen - - 1 - 1 + 2} {\lparen 1 - \rparen}
// =
// =
// `, {
// throwOnError: false
// });
// console.log(htmlF)
})
}, },
methods: { methods: {}
} };
}
</script> </script>
<style scoped> <style scoped>
.formula-transit-service { .csty-formula-box {
width: 100%; width: 100%;
overflow: auto; overflow-x: auto;
font-size: 14px;
color: #606266;
padding: 15px; padding: 15px;
margin: 10px;
background-color: aliceblue;
border-radius: 5px;
} }
.csty-formula {
.formula-box { min-width: 1500px;
font: normal 1.21em KaTeX_Main, Times New Roman, serif;
width: 1500px;
padding: 30px;
} }
.csty-formula-box-x {
::v-deep .formula-input-top { display: flex;
width: 80px; flex-direction: row;
display: inline-block; align-items: center;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: -4px;
} }
.csty-formula-box-y {
::v-deep .formula-input-top .el-input__inner { display: flex;
padding: 0px 5px; flex-direction: column;
height: 20px; align-items: center;
line-height: 20px;
} }
.csty-formula-item {
::v-deep .formula-input-bottom { padding: 5px 5px;
width: 80px;
display: inline-block;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 6px;
} }
.csty-formula-item-y {
::v-deep .formula-input-bottom .el-input__inner { padding: 5px 5px;
padding: 0px 5px; width: 100%;
height: 20px;
line-height: 20px;
} }
.csty-formula-line {
::v-deep .formula-input-center { border-bottom: 1px solid #606266;
width: 80px; width: 100%;
display: inline-block; height: 0;
height: 20px;
line-height: 20px;
font-size: 12px;
margin: 0px 5px;
top: 0px;
} }
.csty-formula-input {
::v-deep .formula-input-center .el-input__inner { width: 110px;
padding: 0px 5px;
height: 20px;
line-height: 20px;
} }
</style> </style>

@ -76,7 +76,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="inventoryNumberSum" label="库存数量" align="center" width="150"> <el-table-column prop="inventoryNumberSum" label="库存数量" align="center" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="inventoryNumber0" label="占用库存" align="center" width="150"> <el-table-column prop="occupyInventorySum" label="占用库存" align="center" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="inventoryNumber1" label="可用库存" align="center" width="150"> <el-table-column prop="inventoryNumber1" label="可用库存" align="center" width="150">
</el-table-column> </el-table-column>

Loading…
Cancel
Save